net: resolve 1 instance of -Wdelete-incomplete

Descent3/multi_dll_mgr.cpp:974:43: warning: deleting "void*" is
undefined [-Wdelete-incomplete]

(``delete`` requires that types are _complete_, so as to find the
right destructor to call; ``void`` is incomplete by definition.)
This commit is contained in:
Jan Engelhardt 2024-11-06 17:58:42 +01:00
parent 48953868df
commit 61439b379d
11 changed files with 502 additions and 504 deletions

View File

@ -712,7 +712,7 @@ void SetUITextItemText(UITextItem *uit, char *newtext, uint32_t color) {
strcpy(uit->m_Text, newtext);
uit->set_color(color);
}
void *NewUIWindowCreate(int x, int y, int w, int h, int flags) {
UIObject *NewUIWindowCreate(int x, int y, int w, int h, int flags) {
NewUIWindow *newwin;
newwin = new NewUIWindow;
newwin->Create(x, y, w, h, flags);
@ -721,14 +721,14 @@ void *NewUIWindowCreate(int x, int y, int w, int h, int flags) {
void NewUIWindowDestroy(NewUIWindow *deswin) { deswin->Destroy(); }
void NewUIWindowOpen(NewUIWindow *deswin) { deswin->Open(); }
void NewUIWindowClose(NewUIWindow *deswin) { deswin->Close(); }
void *TextCreate(UIWindow *parentwin, UITextItem *textitem, int x, int y, int flags) {
UIObject *TextCreate(UIWindow *parentwin, UITextItem *textitem, int x, int y, int flags) {
UIText *newtext;
newtext = new UIText;
newtext->Create(parentwin, textitem, x, y, flags);
return newtext;
}
void TextSetTitle(UIText *text, UITextItem *textitem) { text->SetTitle(textitem); }
void *EditCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags) {
UIObject *EditCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags) {
NewUIEdit *newedit;
newedit = new NewUIEdit;
newedit->Create(parentwin, id, x, y, w, h, flags);
@ -736,13 +736,13 @@ void *EditCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int fl
}
void EditSetText(NewUIEdit *item, const char *newtext) { item->SetText(newtext); }
void EditGetText(NewUIEdit *item, char *buff, int len) { item->GetText(buff, len); }
void *ButtonCreate(UIWindow *parentwin, int id, UITextItem *titleitem, int x, int y, int w, int h, int flags) {
UIObject *ButtonCreate(UIWindow *parentwin, int id, UITextItem *titleitem, int x, int y, int w, int h, int flags) {
UIButton *newbutt;
newbutt = new UIButton;
newbutt->Create(parentwin, id, titleitem, x, y, w, h, flags);
return newbutt;
}
void *ListCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags) {
UIObject *ListCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags) {
NewUIListBox *newlist;
newlist = new NewUIListBox;
newlist->Create(parentwin, id, x, y, w, h, flags);
@ -777,7 +777,7 @@ void DatabaseWriteInt(const char *label, int val) {
Database->write(label, val);
}
void DescentDefer(void) { Descent->defer(); }
void *NewUIGameWindowCreate(int x, int y, int w, int h, int flags) {
UIObject *NewUIGameWindowCreate(int x, int y, int w, int h, int flags) {
NewUIGameWindow *newgamewin;
newgamewin = new NewUIGameWindow;
newgamewin->Create(x, y, w, h, flags);
@ -786,8 +786,8 @@ void *NewUIGameWindowCreate(int x, int y, int w, int h, int flags) {
void NewUIGameWindowDestroy(NewUIGameWindow *item) { item->Destroy(); }
void NewUIGameWindowOpen(NewUIGameWindow *item) { item->Open(); }
void NewUIGameWindowClose(NewUIGameWindow *item) { item->Close(); }
void *HotSpotCreate(UIWindow *parentwin, int id, int key, UIItem *txtitemoff, UIItem *txtitemon, int x, int y, int w,
int h, int flags) {
UIObject *HotSpotCreate(UIWindow *parentwin, int id, int key, UIItem *txtitemoff, UIItem *txtitemon,
int x, int y, int w, int h, int flags) {
UIHotspot *newhs;
newhs = new UIHotspot;
if (newhs)
@ -795,7 +795,7 @@ void *HotSpotCreate(UIWindow *parentwin, int id, int key, UIItem *txtitemoff, UI
return newhs;
}
void HotSpotSetStates(UIHotspot *hs, UIItem *texton, UIItem *textoff) { hs->SetStates(textoff, texton); }
void *CheckBoxCreate(UIWindow *parent, int id, UIItem *title, int x, int y, int w, int h, int flags) {
UIObject *CheckBoxCreate(UIWindow *parent, int id, UIItem *title, int x, int y, int w, int h, int flags) {
UICheckBox *newcb;
newcb = new UICheckBox;
if (newcb)
@ -831,7 +831,7 @@ int PollUI(void) {
}
return result;
}
void *CreateNewUITextItem(const char *newtext, uint32_t color, int font) {
UIItem *CreateNewUITextItem(const char *newtext, uint32_t color, int font) {
UITextItem *new_text_item;
if (font == -1) {
new_text_item = new UITextItem(newtext);
@ -855,7 +855,7 @@ void RemoveUITextItem(void *item) {
UITextItem *old_text_item = (UITextItem *)item;
delete old_text_item;
}
void *CreateNewUIBmpItem(int handle, uint8_t alpha) {
UIItem *CreateNewUIBmpItem(int handle, uint8_t alpha) {
UIBitmapItem *new_bmp_item;
new_bmp_item = new UIBitmapItem(handle, alpha);
return new_bmp_item;
@ -900,7 +900,7 @@ void CloseSplashScreen(void) {
} else
return;
}
void *UIConsoleGadgetCreate(UIWindow *parentid, int id, int x, int y, int font, int cols, int rows, int flags) {
UIObject *UIConsoleGadgetCreate(UIWindow *parentid, int id, int x, int y, int font, int cols, int rows, int flags) {
UIConsoleGadget *newconsole;
newconsole = new UIConsoleGadget;
newconsole->Create(parentid, id, x, y, BRIEFING_FONT, cols, rows, flags);
@ -922,7 +922,7 @@ void UIConsoleGadgetputs(UIConsoleGadget *item, const char *str) {
item->puts(GR_RGB(r, g, b), str);
}
void NewUIWindowSetFocusOnEditGadget(UIEdit *item, UIWindow *parent) { item->Activate(); }
void *OldListCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags) {
UIObject *OldListCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags) {
UIListBox *newoldlist;
newoldlist = new UIListBox;
newoldlist->Create(parentitem, id, x, y, w, h, flags);
@ -944,7 +944,7 @@ const char *OldListGetItem(UIListBox *item, int index) {
}
}
int OldListGetSelectedIndex(UIListBox *item) { return item->GetSelectedIndex(); }
void *OldEditCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags) {
UIObject *OldEditCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags) {
UIEdit *newoldedit;
newoldedit = new UIEdit;
newoldedit->Create(parentitem, id, x, y, w, h, flags);
@ -971,13 +971,13 @@ void SetOldEditBufferLen(UIEdit *item, int len) { item->SetBufferLen(len); }
void NewUIWindowLoadBackgroundImage(NewUIWindow *item, const char *image_name) {
item->LoadBackgroundImage(image_name);
}
void DeleteUIItem(void *delitem) { delete delitem; } // !!! FIXME: this needs to change, but this deletes a lot of different things...
void DeleteUIItem(UIObject *delitem) { delete delitem; }
void GadgetDestroy(UIGadget *item) { item->Destroy(); }
void *SliderCreate(UIWindow *parent, int id, int x, int y, int flags) {
UIObject *SliderCreate(UIWindow *parent, int id, int x, int y, int flags) {
NewUISlider *slid;
slid = new NewUISlider;
slid->Create(parent, id, x, y, flags);
return (void *)slid;
return slid;
}
void SliderSetRange(UISlider *slider, int range) { slider->SetRange(range); }
int SliderGetRange(UISlider *slider) { return slider->GetRange(); }

View File

@ -120,15 +120,15 @@ int LoadMultiDLL(const char *name);
void CallMultiDLL(int eventnum);
void SetUITextItemText(UITextItem *uit, char *newtext, uint32_t color);
void *NewUIWindowCreate(int x, int y, int w, int h, int flags);
UIObject *NewUIWindowCreate(int x, int y, int w, int h, int flags);
void NewUIWindowDestroy(NewUIWindow *deswin);
void NewUIWindowOpen(NewUIWindow *deswin);
void NewUIWindowClose(NewUIWindow *deswin);
void *TextCreate(UIWindow *parentwin, UITextItem *textitem, int x, int y, int flags);
UIObject *TextCreate(UIWindow *parentwin, UITextItem *textitem, int x, int y, int flags);
void TextSetTitle(UIText *text, UITextItem *textitem);
void *EditCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags);
void *ButtonCreate(UIWindow *parentwin, int id, UITextItem *titleitem, int x, int y, int w, int h, int flags);
void *ListCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags);
UIObject *EditCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags);
UIObject *ButtonCreate(UIWindow *parentwin, int id, UITextItem *titleitem, int x, int y, int w, int h, int flags);
UIObject *ListCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags);
void ListRemoveAll(UIListBox *item);
void ListAddItem(UIListBox *item, UITextItem *uitext);
void ListRemoveItem(UIListBox *item, UITextItem *txtitem);
@ -141,29 +141,29 @@ void EditGetText(NewUIEdit *item, char *buff, int len);
void DatabaseRead(const char *label, char *entry, int *entrylen);
void DatabaseWrite(const char *label, const char *entry, int entrylen);
void DescentDefer(void);
void *NewUIGameWindowCreate(int x, int y, int w, int h, int flags = UIF_PROCESS_ALL);
UIObject *NewUIGameWindowCreate(int x, int y, int w, int h, int flags = UIF_PROCESS_ALL);
void NewUIGameWindowDestroy(NewUIGameWindow *item);
void NewUIGameWindowOpen(NewUIGameWindow *item);
void NewUIGameWindowClose(NewUIGameWindow *item);
void *HotSpotCreate(UIWindow *parentwin, int id, int key, UIItem *txtitemoff, UIItem *txtitemon, int x, int y, int w,
int h, int flags);
UIObject *HotSpotCreate(UIWindow *parentwin, int id, int key, UIItem *txtitemoff, UIItem *txtitemon,
int x, int y, int w, int h, int flags);
void HotSpotSetStates(UIHotspot *hs, UIItem *texton, UIItem *textoff);
int PollUI(void);
void RemoveUITextItem(void *item);
void *CreateNewUITextItem(const char *newtext, uint32_t color, int font = -1);
UIItem *CreateNewUITextItem(const char *newtext, uint32_t color, int font = -1);
void RemoveUIBmpItem(void *item);
void *CreateNewUIBmpItem(int handle, uint8_t alpha);
UIItem *CreateNewUIBmpItem(int handle, uint8_t alpha);
void CloseSplashScreen(void);
void CreateSplashScreen(const char *msg, int usecancel);
void *UIConsoleGadgetCreate(UIWindow *parentid, int id, int x, int y, int font, int cols, int rows, int flags);
UIObject *UIConsoleGadgetCreate(UIWindow *parentid, int id, int x, int y, int font, int cols, int rows, int flags);
void UIConsoleGadgetputs(UIConsoleGadget *item, const char *str);
void NewUIWindowSetFocusOnEditGadget(UIEdit *item, UIWindow *parent);
void *OldListCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags);
UIObject *OldListCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags);
void OldListRemoveAll(UIListBox *item);
void OldListAddItem(UIListBox *item, UITextItem *uitext);
void OldListRemoveItem(UIListBox *item, UITextItem *txtitem);
void OldListSelectItem(UIListBox *item, UITextItem *txtitem);
void *OldEditCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags);
UIObject *OldEditCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags);
void OldEditGetText(UIEdit *item, char *buff, int len);
void OldEditSetText(UIEdit *item, const char *newtext);
const char *OldListGetItem(UIListBox *item, int index);
@ -171,20 +171,20 @@ int OldListGetSelectedIndex(UIListBox *item);
void ToggleUICallback(int state);
void SetOldEditBufferLen(UIEdit *item, int len);
void NewUIWindowLoadBackgroundImage(NewUIWindow *item, const char *image_name);
void DeleteUIItem(void *delitem);
void DeleteUIItem(UIObject *);
void DatabaseReadInt(const char *label, int *val);
void DatabaseWriteInt(const char *label, int val);
void GadgetDestroy(UIGadget *item);
int GetUIItemWidth(void *item);
int GetUIItemHeight(void *item);
void *SliderCreate(UIWindow *parent, int id, int x, int y, int flags = 0);
UIObject *SliderCreate(UIWindow *parent, int id, int x, int y, int flags = 0);
void SliderSetRange(UISlider *slider, int range);
int SliderGetRange(UISlider *slider);
void SliderSetPos(UISlider *slider, int pos);
int SliderGetPos(UISlider *slider);
void SliderSetSelectChangeCallback(UISlider *slider, void (*fn)(int));
void SliderSetSelectChangeCallbackWData(UISlider *slider, void (*fn)(int, void *), void *ptr);
void *CheckBoxCreate(UIWindow *parent, int id, UIItem *title, int x, int y, int w, int h, int flags);
UIObject *CheckBoxCreate(UIWindow *parent, int id, UIItem *title, int x, int y, int w, int h, int flags);
void CheckBoxSetCheck(UICheckBox *cb, bool state);
bool CheckBoxIsChecked(UICheckBox *cb);
void GetUIItemPosition(UIObject *item, int *x, int *y, int *w, int *h);

View File

@ -376,37 +376,37 @@ int MainMultiplayerMenu() {
DLLToggleUICallback(0);
ChatStarted = 1;
void *title_text = DLLCreateNewUITextItem(TXT_ODT_CONNECTING, UICOL_WINDOW_TITLE);
auto title_text = DLLCreateNewUITextItem(TXT_ODT_CONNECTING, UICOL_WINDOW_TITLE);
void *cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI);
void *cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO);
auto cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI);
auto cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO);
void *exit_on_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_HI);
void *exit_off_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_LO);
auto exit_on_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_HI);
auto exit_off_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_LO);
void *priv_msg_on_text = DLLCreateNewUITextItem(TXT_ODT_SENDPRIV, UICOL_HOTSPOT_HI);
void *priv_msg_off_text = DLLCreateNewUITextItem(TXT_ODT_SENDPRIV, UICOL_HOTSPOT_LO);
auto priv_msg_on_text = DLLCreateNewUITextItem(TXT_ODT_SENDPRIV, UICOL_HOTSPOT_HI);
auto priv_msg_off_text = DLLCreateNewUITextItem(TXT_ODT_SENDPRIV, UICOL_HOTSPOT_LO);
void *join_lobby_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINPRIV, UICOL_HOTSPOT_HI);
void *join_lobby_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINPRIV, UICOL_HOTSPOT_LO);
auto join_lobby_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINPRIV, UICOL_HOTSPOT_HI);
auto join_lobby_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINPRIV, UICOL_HOTSPOT_LO);
void *join_chan_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINCHAN, UICOL_HOTSPOT_HI);
void *join_chan_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINCHAN, UICOL_HOTSPOT_LO);
auto join_chan_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINCHAN, UICOL_HOTSPOT_HI);
auto join_chan_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINCHAN, UICOL_HOTSPOT_LO);
void *find_pilot_on_text = DLLCreateNewUITextItem(TXT_ODT_FINDPILOT, UICOL_HOTSPOT_HI);
void *find_pilot_off_text = DLLCreateNewUITextItem(TXT_ODT_FINDPILOT, UICOL_HOTSPOT_LO);
auto find_pilot_on_text = DLLCreateNewUITextItem(TXT_ODT_FINDPILOT, UICOL_HOTSPOT_HI);
auto find_pilot_off_text = DLLCreateNewUITextItem(TXT_ODT_FINDPILOT, UICOL_HOTSPOT_LO);
void *game_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINSTARTGAME, UICOL_HOTSPOT_HI);
void *game_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINSTARTGAME, UICOL_HOTSPOT_LO);
auto game_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINSTARTGAME, UICOL_HOTSPOT_HI);
auto game_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINSTARTGAME, UICOL_HOTSPOT_LO);
void *send_on_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_HI);
void *send_off_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_LO);
auto send_on_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_HI);
auto send_off_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_LO);
char fmtlobbytext[200];
snprintf(fmtlobbytext, sizeof(fmtlobbytext), TXT_ODT_YOUAREINLOBBY, Ourlobby);
void *lobby_text = DLLCreateNewUITextItem(fmtlobbytext, UICOL_TEXT_AUX);
auto lobby_text = DLLCreateNewUITextItem(fmtlobbytext, UICOL_TEXT_AUX);
void *blank_text = DLLCreateNewUITextItem(TXT_ODT_BLANK, UICOL_TEXT_AUX);
auto blank_text = DLLCreateNewUITextItem(TXT_ODT_BLANK, UICOL_TEXT_AUX);
char sendline[MAX_CHAT_SEND_LEN];
int exit_menu = 0;
int ret = 0;
@ -436,41 +436,41 @@ int MainMultiplayerMenu() {
}
// Create our buttons
void *main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL);
auto main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL);
// void HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w,
// int h, int flags,int winnum)
/* void *exit_hs = */ DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 33, 427, 70, 15, 0);
/* auto exit_hs = */ DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 33, 427, 70, 15, 0);
void *priv_hs = DLLHotSpotCreate(main_wnd, 6, 0, priv_msg_off_text, priv_msg_on_text, 328, 403, 170, 15, 0);
auto priv_hs = DLLHotSpotCreate(main_wnd, 6, 0, priv_msg_off_text, priv_msg_on_text, 328, 403, 170, 15, 0);
#define JOIN_ROW 131
void *join_lobby_hs =
auto join_lobby_hs =
DLLHotSpotCreate(main_wnd, 7, 0, join_lobby_off_text, join_lobby_on_text, 400, JOIN_ROW, 170, 15, 0);
void *join_chan_hs =
auto join_chan_hs =
DLLHotSpotCreate(main_wnd, 14, 0, join_chan_off_text, join_chan_on_text, 178, JOIN_ROW, 170, 15, 0);
void *find_hs = DLLHotSpotCreate(main_wnd, 9, 0, find_pilot_off_text, find_pilot_on_text, 156, 403, 140, 15, 0);
auto find_hs = DLLHotSpotCreate(main_wnd, 9, 0, find_pilot_off_text, find_pilot_on_text, 156, 403, 140, 15, 0);
void *game_hs = DLLHotSpotCreate(main_wnd, 11, 0, game_off_text, game_on_text, 505, 431, 135, 15, 0);
auto game_hs = DLLHotSpotCreate(main_wnd, 11, 0, game_off_text, game_on_text, 505, 431, 135, 15, 0);
void *enter_hs = DLLHotSpotCreate(main_wnd, 15, KEY_ENTER, send_off_text, send_on_text, 550, 370, 70, 15, 0);
auto enter_hs = DLLHotSpotCreate(main_wnd, 15, KEY_ENTER, send_off_text, send_on_text, 550, 370, 70, 15, 0);
// lobby_text
void *lobby_txt_gadget = DLLTextCreate(main_wnd, lobby_text, 200, 450, UIF_CENTER);
auto lobby_txt_gadget = DLLTextCreate(main_wnd, lobby_text, 200, 450, UIF_CENTER);
// User list box, id #10
void *user_list = DLLOldListCreate(main_wnd, 10, colx1 + 20, 100, 108, 265, 0);
auto user_list = DLLOldListCreate(main_wnd, 10, colx1 + 20, 100, 108, 265, 0);
// Channel list box, id #14
void *chan_list = DLLOldListCreate(main_wnd, 14, colx2, 25, 470, 96, 0);
auto chan_list = DLLOldListCreate(main_wnd, 14, colx2, 25, 470, 96, 0);
// Edit box for typing in chat, id # 15
void *send_edit = DLLOldEditCreate(main_wnd, 15, colx2 + 10, 372, 390, 20, UIED_AUTOSELECT);
auto send_edit = DLLOldEditCreate(main_wnd, 15, colx2 + 10, 372, 390, 20, UIED_AUTOSELECT);
DLLNewUIWindowLoadBackgroundImage(main_wnd, "d3online_main.ogf");
DLLSetOldEditBufferLen(send_edit, 100);
void *console_item = DLLUIConsoleGadgetCreate(main_wnd, 16, colx2, 165, 0, 51, 16, 0);
auto console_item = DLLUIConsoleGadgetCreate(main_wnd, 16, colx2, 165, 0, 51, 16, 0);
pconsole = console_item;
DLLNewUIWindowOpen(main_wnd);
@ -1062,45 +1062,44 @@ int SearchMasterTrackerGameMenu() {
float last_req_time;
float last_master_req_time;
char selgame[200];
void *return_text_on = DLLCreateNewUITextItem(TXT_ODT_RETURNTOCHAT, UICOL_HOTSPOT_HI);
void *return_text_off = DLLCreateNewUITextItem(TXT_ODT_RETURNTOCHAT, UICOL_HOTSPOT_LO);
void *game_head_text = DLLCreateNewUITextItem(TXT_ODT_GAMELISTHDR, UICOL_TEXT_NORMAL);
void *exit_on_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_HI);
void *exit_off_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_LO);
void *join_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINSEL, UICOL_HOTSPOT_HI);
void *join_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINSEL, UICOL_HOTSPOT_LO);
void *start_on_text = DLLCreateNewUITextItem(TXT_ODT_STARTNEW, UICOL_HOTSPOT_HI);
void *start_off_text = DLLCreateNewUITextItem(TXT_ODT_STARTNEW, UICOL_HOTSPOT_LO);
auto return_text_on = DLLCreateNewUITextItem(TXT_ODT_RETURNTOCHAT, UICOL_HOTSPOT_HI);
auto return_text_off = DLLCreateNewUITextItem(TXT_ODT_RETURNTOCHAT, UICOL_HOTSPOT_LO);
auto game_head_text = DLLCreateNewUITextItem(TXT_ODT_GAMELISTHDR, UICOL_TEXT_NORMAL);
auto exit_on_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_HI);
auto exit_off_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_LO);
auto join_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINSEL, UICOL_HOTSPOT_HI);
auto join_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINSEL, UICOL_HOTSPOT_LO);
auto start_on_text = DLLCreateNewUITextItem(TXT_ODT_STARTNEW, UICOL_HOTSPOT_HI);
auto start_off_text = DLLCreateNewUITextItem(TXT_ODT_STARTNEW, UICOL_HOTSPOT_LO);
void *gname_on_text = DLLCreateNewUITextItem(TXT_ODT_GAMENAME2, UICOL_HOTSPOT_HI);
void *gname_off_text = DLLCreateNewUITextItem(TXT_ODT_GAMENAME2, UICOL_HOTSPOT_LO);
void *gtype_on_text = DLLCreateNewUITextItem(TXT_ODT_GAMETYPE, UICOL_HOTSPOT_HI);
void *gtype_off_text = DLLCreateNewUITextItem(TXT_ODT_GAMETYPE, UICOL_HOTSPOT_LO);
void *msn_on_text = DLLCreateNewUITextItem(TXT_ODT_MISSION, UICOL_HOTSPOT_HI);
void *msn_off_text = DLLCreateNewUITextItem(TXT_ODT_MISSION, UICOL_HOTSPOT_LO);
void *lvl_on_text = DLLCreateNewUITextItem(TXT_ODT_LEVEL, UICOL_HOTSPOT_HI);
void *lvl_off_text = DLLCreateNewUITextItem(TXT_ODT_LEVEL, UICOL_HOTSPOT_LO);
void *plrs_on_text = DLLCreateNewUITextItem(TXT_ODT_PLAYERS, UICOL_HOTSPOT_HI);
void *plrs_off_text = DLLCreateNewUITextItem(TXT_ODT_PLAYERS, UICOL_HOTSPOT_LO);
void *ping_on_text = DLLCreateNewUITextItem(TXT_ODT_PING, UICOL_HOTSPOT_HI);
void *ping_off_text = DLLCreateNewUITextItem(TXT_ODT_PING, UICOL_HOTSPOT_LO);
auto gname_on_text = DLLCreateNewUITextItem(TXT_ODT_GAMENAME2, UICOL_HOTSPOT_HI);
auto gname_off_text = DLLCreateNewUITextItem(TXT_ODT_GAMENAME2, UICOL_HOTSPOT_LO);
auto gtype_on_text = DLLCreateNewUITextItem(TXT_ODT_GAMETYPE, UICOL_HOTSPOT_HI);
auto gtype_off_text = DLLCreateNewUITextItem(TXT_ODT_GAMETYPE, UICOL_HOTSPOT_LO);
auto msn_on_text = DLLCreateNewUITextItem(TXT_ODT_MISSION, UICOL_HOTSPOT_HI);
auto msn_off_text = DLLCreateNewUITextItem(TXT_ODT_MISSION, UICOL_HOTSPOT_LO);
auto lvl_on_text = DLLCreateNewUITextItem(TXT_ODT_LEVEL, UICOL_HOTSPOT_HI);
auto lvl_off_text = DLLCreateNewUITextItem(TXT_ODT_LEVEL, UICOL_HOTSPOT_LO);
auto plrs_on_text = DLLCreateNewUITextItem(TXT_ODT_PLAYERS, UICOL_HOTSPOT_HI);
auto plrs_off_text = DLLCreateNewUITextItem(TXT_ODT_PLAYERS, UICOL_HOTSPOT_LO);
auto ping_on_text = DLLCreateNewUITextItem(TXT_ODT_PING, UICOL_HOTSPOT_HI);
auto ping_off_text = DLLCreateNewUITextItem(TXT_ODT_PING, UICOL_HOTSPOT_LO);
char fmt_textstr[200];
snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_ODT_MAKEGAMEDEFAULT, 28);
void *default_on_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_HI);
auto default_on_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_HI);
snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_ODT_MAKEGAMEDEFAULT, 28);
void *default_off_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_LO);
void *game_hdr_text = DLLCreateNewUITextItem(TXT_ODT_GAME_HDR, UICOL_WINDOW_TITLE);
auto default_off_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_LO);
auto game_hdr_text = DLLCreateNewUITextItem(TXT_ODT_GAME_HDR, UICOL_WINDOW_TITLE);
void *info_on_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_HI);
void *info_off_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_LO);
auto info_on_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_HI);
auto info_off_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_LO);
memset(Gamelist, 0, sizeof(Gamelist));
NextGameItemNo = 0;
void *return_hs;
void *set_dft_hs;
UIObject *set_dft_hs;
void *net_game_txt_items[MAX_NET_GAMES];
int a;
@ -1112,16 +1111,16 @@ int SearchMasterTrackerGameMenu() {
DLLSetScreenMode(SM_MENU);
*DLLNewUIWindow_alpha = 255;
void *main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL);
auto main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL);
void *screen_header = DLLTextCreate(main_wnd, game_hdr_text, 5, 15, UIF_CENTER);
auto screen_header = DLLTextCreate(main_wnd, game_hdr_text, 5, 15, UIF_CENTER);
cury += 30;
void *start_hs = DLLHotSpotCreate(main_wnd, 7, KEY_S, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTER);
auto start_hs = DLLHotSpotCreate(main_wnd, 7, KEY_S, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTER);
cury += 30;
int setdfty;
return_hs = DLLHotSpotCreate(main_wnd, 8, KEY_R, return_text_off, return_text_on, 490, cury, 250, 15, UIF_CENTER);
auto return_hs = DLLHotSpotCreate(main_wnd, 8, KEY_R, return_text_off, return_text_on, 490, cury, 250, 15, UIF_CENTER);
cury += 20;
if (Bypass_chat) {
@ -1143,29 +1142,29 @@ int SearchMasterTrackerGameMenu() {
cury += 30;
}
void *gname_hs = DLLHotSpotCreate(main_wnd, SORT_GAMENAME, 0, gname_off_text, gname_on_text, 44, cury,
DLLgrtext_GetTextLineWidth(TXT_ODT_GAMENAME2) + 1, 15, 0);
void *gtype_hs = DLLHotSpotCreate(main_wnd, SORT_GAMETYPE, 0, gtype_off_text, gtype_on_text, 215, cury,
DLLgrtext_GetTextLineWidth(TXT_ODT_GAMETYPE) + 1, 15, 0);
void *msn_hs = DLLHotSpotCreate(main_wnd, SORT_MISSION, 0, msn_off_text, msn_on_text, 320, cury,
DLLgrtext_GetTextLineWidth(TXT_ODT_MISSION) + 1, 15, 0);
void *lvl_hs = DLLHotSpotCreate(main_wnd, SORT_LEVEL, 0, lvl_off_text, lvl_on_text, 428, cury,
DLLgrtext_GetTextLineWidth(TXT_ODT_LEVEL) + 1, 15, 0);
void *players_hs = DLLHotSpotCreate(main_wnd, SORT_PLAYERS, 0, plrs_off_text, plrs_on_text, 479, cury,
DLLgrtext_GetTextLineWidth(TXT_ODT_PLAYERS) + 1, 15, 0);
void *ping_hs = DLLHotSpotCreate(main_wnd, SORT_PING, 0, ping_off_text, ping_on_text, 549, cury,
DLLgrtext_GetTextLineWidth(TXT_ODT_PING) + 1, 15, 0);
auto gname_hs = DLLHotSpotCreate(main_wnd, SORT_GAMENAME, 0, gname_off_text, gname_on_text, 44, cury,
DLLgrtext_GetTextLineWidth(TXT_ODT_GAMENAME2) + 1, 15, 0);
auto gtype_hs = DLLHotSpotCreate(main_wnd, SORT_GAMETYPE, 0, gtype_off_text, gtype_on_text, 215, cury,
DLLgrtext_GetTextLineWidth(TXT_ODT_GAMETYPE) + 1, 15, 0);
auto msn_hs = DLLHotSpotCreate(main_wnd, SORT_MISSION, 0, msn_off_text, msn_on_text, 320, cury,
DLLgrtext_GetTextLineWidth(TXT_ODT_MISSION) + 1, 15, 0);
auto lvl_hs = DLLHotSpotCreate(main_wnd, SORT_LEVEL, 0, lvl_off_text, lvl_on_text, 428, cury,
DLLgrtext_GetTextLineWidth(TXT_ODT_LEVEL) + 1, 15, 0);
auto players_hs = DLLHotSpotCreate(main_wnd, SORT_PLAYERS, 0, plrs_off_text, plrs_on_text, 479, cury,
DLLgrtext_GetTextLineWidth(TXT_ODT_PLAYERS) + 1, 15, 0);
auto ping_hs = DLLHotSpotCreate(main_wnd, SORT_PING, 0, ping_off_text, ping_on_text, 549, cury,
DLLgrtext_GetTextLineWidth(TXT_ODT_PING) + 1, 15, 0);
cury += 15;
void *game_list = DLLListCreate(main_wnd, 6, 10, cury, 600, 230, UIF_CENTER | UILB_NOSORT);
auto game_list = DLLListCreate(main_wnd, 6, 10, cury, 600, 230, UIF_CENTER | UILB_NOSORT);
cury += 260;
int curyButtomMenu = cury;
void *join_hs =
auto join_hs =
DLLHotSpotCreate(main_wnd, 6, KEY_ENTER, join_off_text, join_on_text, 100, curyButtomMenu, 130, 15, 0);
void *exit_hs = DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 400, curyButtomMenu, 70, 15, 0);
auto exit_hs = DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 400, curyButtomMenu, 70, 15, 0);
void *info_hs = DLLHotSpotCreate(main_wnd, GET_INFO_ID, KEY_I, info_off_text, info_on_text, 1, 1, 1, 1, 0);
auto info_hs = DLLHotSpotCreate(main_wnd, GET_INFO_ID, KEY_I, info_off_text, info_on_text, 1, 1, 1, 1, 0);
DLLNewUIWindowLoadBackgroundImage(main_wnd, "d3online_game.ogf");
@ -1181,8 +1180,8 @@ int SearchMasterTrackerGameMenu() {
*DLLNum_network_games_known = 0;
DLLmprintf(0, "Waiting for Mastertracker response.\n");
void *ui_directip_counter = DLLCreateNewUITextItem("0 Server", GR_LIGHTGRAY);
void *directip_counter = DLLTextCreate(main_wnd, ui_directip_counter, 290, curyButtomMenu, 130);
auto ui_directip_counter = DLLCreateNewUITextItem("0 Server", GR_LIGHTGRAY);
auto directip_counter = DLLTextCreate(main_wnd, ui_directip_counter, 290, curyButtomMenu, 130);
int currentNumServers = 0;
// Menu loop
@ -1500,14 +1499,14 @@ int JoinNewLobby(const char *lobby) {
int rcode;
const char *p;
DLLmprintf(0, "Entering new lobby");
void *title_text = DLLCreateNewUITextItem(TXT_ODT_ENTERINGLOBBY, UICOL_WINDOW_TITLE);
auto title_text = DLLCreateNewUITextItem(TXT_ODT_ENTERINGLOBBY, UICOL_WINDOW_TITLE);
void *cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI);
void *cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO);
auto cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI);
auto cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO);
void *main_wnd = DLLNewUIGameWindowCreate(0, 256, 128, 128, UIF_CENTER | UIF_PROCESS_ALL | NUWF_TITLEMED);
void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
void *cancel_hs =
auto main_wnd = DLLNewUIGameWindowCreate(0, 256, 128, 128, UIF_CENTER | UIF_PROCESS_ALL | NUWF_TITLEMED);
auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
auto cancel_hs =
DLLHotSpotCreate(main_wnd, 5, KEY_ESC, cancel_off_text, cancel_on_text, 20, 100, 70, 15, UIF_CENTER);
DLLNewUIGameWindowOpen(main_wnd);
@ -1557,29 +1556,29 @@ const char *SendWhisper(const char *name) {
char message[MAX_CHAT_SEND_LEN];
char pilot_name[MAX_CHAT_SEND_LEN];
static char fmt_msg[MAX_CHAT_SEND_LEN * 2];
void *title_text = DLLCreateNewUITextItem(TXT_ODT_PRIVATEMESSAGE, UICOL_WINDOW_TITLE);
auto title_text = DLLCreateNewUITextItem(TXT_ODT_PRIVATEMESSAGE, UICOL_WINDOW_TITLE);
void *cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI);
void *cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO);
void *send_on_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_HI);
void *send_off_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_LO);
auto cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI);
auto cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO);
auto send_on_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_HI);
auto send_off_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_LO);
void *pilot_text = DLLCreateNewUITextItem(TXT_ODT_PILOTNAME, UICOL_TEXT_NORMAL);
void *message_text = DLLCreateNewUITextItem(TXT_ODT_MESSAGE, UICOL_TEXT_NORMAL);
auto pilot_text = DLLCreateNewUITextItem(TXT_ODT_PILOTNAME, UICOL_TEXT_NORMAL);
auto message_text = DLLCreateNewUITextItem(TXT_ODT_MESSAGE, UICOL_TEXT_NORMAL);
void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 384, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 384, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
void *pilot = DLLTextCreate(main_wnd, pilot_text, 50, 55, 0);
void *message_t = DLLTextCreate(main_wnd, message_text, 50, 110, 0);
void *user_edit = DLLEditCreate(main_wnd, 10, 50, 75, 130, 15, 0);
void *msg_edit = DLLEditCreate(main_wnd, 3, 50, 130, 200, 15, 0);
auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
auto pilot = DLLTextCreate(main_wnd, pilot_text, 50, 55, 0);
auto message_t = DLLTextCreate(main_wnd, message_text, 50, 110, 0);
auto user_edit = DLLEditCreate(main_wnd, 10, 50, 75, 130, 15, 0);
auto msg_edit = DLLEditCreate(main_wnd, 3, 50, 130, 200, 15, 0);
// HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h,
// int flags,int winnum)
void *cancel_hs =
auto cancel_hs =
DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0);
void *send_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, send_on_text, send_off_text, 60, 256 - 80, 60, 20, 0);
auto send_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, send_on_text, send_off_text, 60, 256 - 80, 60, 20, 0);
DLLNewUIGameWindowOpen(main_wnd);
DLLEditSetText(user_edit, name);
@ -1638,27 +1637,27 @@ int JoinPrivateLobby() {
char message[MAX_CHAT_SEND_LEN];
char priv_channel[MAX_CHAT_SEND_LEN];
void *title_text = DLLCreateNewUITextItem(TXT_ODT_JOINPRIV, UICOL_WINDOW_TITLE);
auto title_text = DLLCreateNewUITextItem(TXT_ODT_JOINPRIV, UICOL_WINDOW_TITLE);
void *cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI);
void *cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO);
void *join_on_text = DLLCreateNewUITextItem(TXT_ODT_JOIN, UICOL_HOTSPOT_HI);
void *join_off_text = DLLCreateNewUITextItem(TXT_ODT_JOIN, UICOL_HOTSPOT_LO);
auto cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI);
auto cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO);
auto join_on_text = DLLCreateNewUITextItem(TXT_ODT_JOIN, UICOL_HOTSPOT_HI);
auto join_off_text = DLLCreateNewUITextItem(TXT_ODT_JOIN, UICOL_HOTSPOT_LO);
void *channel_text = DLLCreateNewUITextItem(TXT_ODT_CHANNELNAME, UICOL_TEXT_NORMAL);
auto channel_text = DLLCreateNewUITextItem(TXT_ODT_CHANNELNAME, UICOL_TEXT_NORMAL);
void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLELARGE);
auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLELARGE);
void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
void *channel_t = DLLTextCreate(main_wnd, channel_text, 50, 95, UIF_CENTER);
void *chan_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER);
auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
auto channel_t = DLLTextCreate(main_wnd, channel_text, 50, 95, UIF_CENTER);
auto chan_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER);
// DLLNewUIWindowSetFocusOnEditGadget(chan_edit,main_wnd);
// HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h,
// int flags,int winnum)
void *cancel_hs =
auto cancel_hs =
DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0);
void *join_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, join_on_text, join_off_text, 60, 256 - 80, 60, 20, 0);
auto join_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, join_on_text, join_off_text, 60, 256 - 80, 60, 20, 0);
DLLNewUIGameWindowOpen(main_wnd);
while (!exit_menu) {
int res;
@ -1725,27 +1724,27 @@ int FindPilot() {
char message[MAX_CHAT_SEND_LEN];
char pilot_name[MAX_CHAT_SEND_LEN];
static char fmt_msg[MAX_CHAT_SEND_LEN * 2];
void *title_text = DLLCreateNewUITextItem(TXT_ODT_FINDPILOT, UICOL_WINDOW_TITLE);
auto title_text = DLLCreateNewUITextItem(TXT_ODT_FINDPILOT, UICOL_WINDOW_TITLE);
void *cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI);
void *cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO);
void *search_on_text = DLLCreateNewUITextItem(TXT_ODT_SEARCH, UICOL_HOTSPOT_HI);
void *search_off_text = DLLCreateNewUITextItem(TXT_ODT_SEARCH, UICOL_HOTSPOT_LO);
auto cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI);
auto cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO);
auto search_on_text = DLLCreateNewUITextItem(TXT_ODT_SEARCH, UICOL_HOTSPOT_HI);
auto search_off_text = DLLCreateNewUITextItem(TXT_ODT_SEARCH, UICOL_HOTSPOT_LO);
void *pilot_text = DLLCreateNewUITextItem(TXT_ODT_PILOTNAME, UICOL_TEXT_NORMAL);
auto pilot_text = DLLCreateNewUITextItem(TXT_ODT_PILOTNAME, UICOL_TEXT_NORMAL);
void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
void *title_t = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
void *pilot_t = DLLTextCreate(main_wnd, pilot_text, 50, 95, UIF_CENTER);
void *pilot_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER);
auto title_t = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
auto pilot_t = DLLTextCreate(main_wnd, pilot_text, 50, 95, UIF_CENTER);
auto pilot_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER);
// DLLNewUIWindowSetFocusOnEditGadget(pilot_edit,main_wnd);
// HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h,
// int flags,int winnum)
void *cancel_hs =
auto cancel_hs =
DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0);
void *search_hs =
auto search_hs =
DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, search_on_text, search_off_text, 60, 256 - 80, 60, 20, 0);
DLLNewUIGameWindowOpen(main_wnd);
while (!exit_menu) {

View File

@ -329,13 +329,15 @@ struct multi_api {
int *vp[200]; // variable pointers
};
class UIItem;
typedef void (*GetMultiAPI_fp)(multi_api *api);
GetMultiAPI_fp DLLGetMultiAPI;
typedef void (*SetUITextItemText_fp)(void *uit, char *newtext, uint32_t color);
SetUITextItemText_fp DLLSetUITextItemText;
typedef void *(*NewUIWindowCreate_fp)(int x, int y, int w, int h, int flags);
typedef UIObject *(*NewUIWindowCreate_fp)(int x, int y, int w, int h, int flags);
NewUIWindowCreate_fp DLLNewUIWindowCreate;
typedef void (*NewUIWindowDestroy_fp)(void *deswin);
@ -347,16 +349,16 @@ NewUIWindowOpen_fp DLLNewUIWindowOpen;
typedef void (*NewUIWindowClose_fp)(void *deswin);
NewUIWindowClose_fp DLLNewUIWindowClose;
typedef void *(*TextCreate_fp)(void *parentwin, void *textitem, int x, int y, int flags);
typedef UIObject *(*TextCreate_fp)(void *parentwin, void *textitem, int x, int y, int flags);
TextCreate_fp DLLTextCreate;
typedef void *(*EditCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags);
typedef UIObject *(*EditCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags);
EditCreate_fp DLLEditCreate;
typedef void *(*ButtonCreate_fp)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags);
typedef UIObject *(*ButtonCreate_fp)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags);
ButtonCreate_fp DLLButtonCreate;
typedef void *(*ListCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags);
typedef UIObject *(*ListCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags);
ListCreate_fp DLLListCreate;
typedef void (*ListRemoveAll_fp)(void *item);
@ -415,7 +417,7 @@ ValidateUser_fp DLLValidateUser;
typedef void( *PollPTrackNet_fp) ();
PollPTrackNet_fp DLLPollPTrackNet;
*/
typedef void *(*NewUIGameWindowCreate_fp)(int x, int y, int w, int h, int flags);
typedef UIObject *(*NewUIGameWindowCreate_fp)(int x, int y, int w, int h, int flags);
NewUIGameWindowCreate_fp DLLNewUIGameWindowCreate;
typedef void (*NewUIGameWindowDestroy_fp)(void *item);
@ -467,8 +469,8 @@ nw_GetHostAddressFromNumbers_fp DLLnw_GetHostAddressFromNumbers;
typedef int (*nw_GetProtocolType_fp)(void);
nw_GetProtocolType_fp DLLnw_GetProtocolType;
typedef void *(*HotSpotCreate_fp)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon, int x, int y,
int w, int h, int flags);
typedef UIObject *(*HotSpotCreate_fp)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon,
int x, int y, int w, int h, int flags);
HotSpotCreate_fp DLLHotSpotCreate;
typedef int (*PollUI_fp)(void);
@ -480,9 +482,9 @@ GetMissionName_fp DLLGetMissionName;
typedef void (*RemoveUITextItem_fp)(void *item);
RemoveUITextItem_fp DLLRemoveUITextItem;
typedef void *(*CreateNewUITextItem_fp)(const char *newtext, uint32_t color, int font);
typedef UIItem *(*CreateNewUITextItem_fp)(const char *newtext, uint32_t color, int font);
CreateNewUITextItem_fp DLLCreateNewUITextItemFP;
static inline void *DLLCreateNewUITextItem(const char *newtext, uint32_t color, int font = -1) {
static inline UIItem *DLLCreateNewUITextItem(const char *newtext, uint32_t color, int font = -1) {
return DLLCreateNewUITextItemFP(newtext, color, font);
}
@ -498,8 +500,8 @@ CreateSplashScreen_fp DLLCreateSplashScreen;
typedef void (*CloseSplashScreen_fp)(void);
CloseSplashScreen_fp DLLCloseSplashScreen;
typedef void *(*UIConsoleGadgetCreate_fp)(void *parentid, int id, int x, int y, int font, int cols, int rows,
int flags);
typedef UIObject *(*UIConsoleGadgetCreate_fp)(void *parentid, int id, int x, int y, int font,
int cols, int rows, int flags);
UIConsoleGadgetCreate_fp DLLUIConsoleGadgetCreate;
typedef void (*UIConsoleGadgetputs_fp)(void *item, const char *str);
@ -508,10 +510,10 @@ UIConsoleGadgetputs_fp DLLUIConsoleGadgetputs;
typedef void (*NewUIWindowSetFocusOnEditGadget_fp)(void *item, void *parent);
NewUIWindowSetFocusOnEditGadget_fp DLLNewUIWindowSetFocusOnEditGadget;
typedef void *(*OldEditCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags);
typedef UIObject *(*OldEditCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags);
OldEditCreate_fp DLLOldEditCreate;
typedef void *(*OldListCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags);
typedef UIObject *(*OldListCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags);
OldListCreate_fp DLLOldListCreate;
typedef void (*OldListRemoveAll_fp)(void *item);
@ -550,7 +552,7 @@ SetOldEditBufferLen_fp DLLSetOldEditBufferLen;
typedef void (*NewUIWindowLoadBackgroundImage_fp)(void *item, const char *image_name);
NewUIWindowLoadBackgroundImage_fp DLLNewUIWindowLoadBackgroundImage;
typedef void (*DeleteUIItem_fp)(void *delitem);
typedef void (*DeleteUIItem_fp)(UIObject *);
DeleteUIItem_fp DLLDeleteUIItem;
typedef int (*SearchForLocalGamesIPX_fp)(network_address *check_addr);
@ -915,29 +917,29 @@ void MultiplayerOptionsMenu();
char dll_text[MAX_DLLS][_MAX_PATH];
int StartMultiplayerGameMenu() {
void *game_name_text = DLLCreateNewUITextItem(TXT(10), UICOL_TEXT_NORMAL, -1); // TXT_LC_GAMENAME
void *mission_name_text = DLLCreateNewUITextItem(TXT(11), UICOL_TEXT_NORMAL, -1); // TXT_LC_MSNNAME
void *script_name_text = DLLCreateNewUITextItem(TXT(12), UICOL_TEXT_NORMAL, -1); // TXT_LC_SCRIPTNAME
auto game_name_text = DLLCreateNewUITextItem(TXT(10), UICOL_TEXT_NORMAL, -1); // TXT_LC_GAMENAME
auto mission_name_text = DLLCreateNewUITextItem(TXT(11), UICOL_TEXT_NORMAL, -1); // TXT_LC_MSNNAME
auto script_name_text = DLLCreateNewUITextItem(TXT(12), UICOL_TEXT_NORMAL, -1); // TXT_LC_SCRIPTNAME
void *start_game_on_text = DLLCreateNewUITextItem(TXT(13), UICOL_HOTSPOT_HI, -1); // TXT_LC_STARTGAME
void *multiplayer_opts_on_text = DLLCreateNewUITextItem(TXT(14), UICOL_HOTSPOT_HI, -1); // TXT_LC_MPLYROPTIONS
void *exit_on_text = DLLCreateNewUITextItem(TXT(5), UICOL_HOTSPOT_HI, -1); // TXT_LC_PREVMENU
auto start_game_on_text = DLLCreateNewUITextItem(TXT(13), UICOL_HOTSPOT_HI, -1); // TXT_LC_STARTGAME
auto multiplayer_opts_on_text = DLLCreateNewUITextItem(TXT(14), UICOL_HOTSPOT_HI, -1); // TXT_LC_MPLYROPTIONS
auto exit_on_text = DLLCreateNewUITextItem(TXT(5), UICOL_HOTSPOT_HI, -1); // TXT_LC_PREVMENU
void *start_game_off_text = DLLCreateNewUITextItem(TXT(13), UICOL_HOTSPOT_LO, -1); // TXT_LC_STARTGAME
void *multiplayer_opts_off_text = DLLCreateNewUITextItem(TXT(14), UICOL_HOTSPOT_LO, -1); // TXT_LC_MPLYROPTIONS
void *exit_off_text = DLLCreateNewUITextItem(TXT(5), UICOL_HOTSPOT_LO, -1); // TXT_LC_PREVMENU
auto start_game_off_text = DLLCreateNewUITextItem(TXT(13), UICOL_HOTSPOT_LO, -1); // TXT_LC_STARTGAME
auto multiplayer_opts_off_text = DLLCreateNewUITextItem(TXT(14), UICOL_HOTSPOT_LO, -1); // TXT_LC_MPLYROPTIONS
auto exit_off_text = DLLCreateNewUITextItem(TXT(5), UICOL_HOTSPOT_LO, -1); // TXT_LC_PREVMENU
void *save_settings_txt_on = DLLCreateNewUITextItem(TXT_DLL_SAVESETTINGS, UICOL_HOTSPOT_HI, -1);
void *save_settings_txt_off = DLLCreateNewUITextItem(TXT_DLL_SAVESETTINGS, UICOL_HOTSPOT_LO, -1);
auto save_settings_txt_on = DLLCreateNewUITextItem(TXT_DLL_SAVESETTINGS, UICOL_HOTSPOT_HI, -1);
auto save_settings_txt_off = DLLCreateNewUITextItem(TXT_DLL_SAVESETTINGS, UICOL_HOTSPOT_LO, -1);
void *load_settings_txt_on = DLLCreateNewUITextItem(TXT_DLL_LOADSETTINGS, UICOL_HOTSPOT_HI, -1);
void *load_settings_txt_off = DLLCreateNewUITextItem(TXT_DLL_LOADSETTINGS, UICOL_HOTSPOT_LO, -1);
auto load_settings_txt_on = DLLCreateNewUITextItem(TXT_DLL_LOADSETTINGS, UICOL_HOTSPOT_HI, -1);
auto load_settings_txt_off = DLLCreateNewUITextItem(TXT_DLL_LOADSETTINGS, UICOL_HOTSPOT_LO, -1);
void *start_text = DLLCreateNewUITextItem(TXT(13), UICOL_WINDOW_TITLE, DLL_BIG_BRIEFING_FONT);
auto start_text = DLLCreateNewUITextItem(TXT(13), UICOL_WINDOW_TITLE, DLL_BIG_BRIEFING_FONT);
void *blank_text = DLLCreateNewUITextItem("", GR_BLACK, -1);
auto blank_text = DLLCreateNewUITextItem("", GR_BLACK, -1);
// Name -> UI item
std::map<std::string, void *> dll_ui_items;
std::map<std::string, UIItem *> dll_ui_items;
char str[100];
int exit_menu = 0;
int cury = 40;
@ -947,60 +949,60 @@ int StartMultiplayerGameMenu() {
rendering_state rs;
DLLrend_GetRenderState(&rs);
void *main_wnd = DLLNewUIWindowCreate(0, 0, rs.screen_width, rs.screen_height, UIF_PROCESS_ALL);
auto main_wnd = DLLNewUIWindowCreate(0, 0, rs.screen_width, rs.screen_height, UIF_PROCESS_ALL);
void *start_title = DLLTextCreate(main_wnd, start_text, 0, cury, UIF_CENTER);
auto start_title = DLLTextCreate(main_wnd, start_text, 0, cury, UIF_CENTER);
cury += 35;
// Mission name
void *mission_text = DLLTextCreate(main_wnd, game_name_text, 0, cury, UIF_CENTER);
auto mission_text = DLLTextCreate(main_wnd, game_name_text, 0, cury, UIF_CENTER);
cury += 15;
void *mission_name_edit = DLLEditCreate(main_wnd, id++, 10, cury, 300, 15, UIF_CENTER);
auto mission_name_edit = DLLEditCreate(main_wnd, id++, 10, cury, 300, 15, UIF_CENTER);
cury += 18;
cury += 30;
// mission name
void *game_name = DLLTextCreate(main_wnd, mission_name_text, 45, cury, 0);
auto game_name = DLLTextCreate(main_wnd, mission_name_text, 45, cury, 0);
cury += 15;
void *list_1 = DLLListCreate(main_wnd, id++, 40, cury, 200, 100, 0);
auto list_1 = DLLListCreate(main_wnd, id++, 40, cury, 200, 100, 0);
// Back up the same line!
cury -= 15;
// Script box
void *script_name = DLLTextCreate(main_wnd, script_name_text, 370, cury, 0);
auto script_name = DLLTextCreate(main_wnd, script_name_text, 370, cury, 0);
cury += 18;
void *script_list = DLLListCreate(main_wnd, id++, 360, cury, 200, 100, 0);
auto script_list = DLLListCreate(main_wnd, id++, 360, cury, 200, 100, 0);
cury += 118;
cury += 40;
// Start button
int start_button = UID_OK;
void *start_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, start_game_off_text, start_game_on_text, 10, cury, 180,
30, UIF_FIT | UIF_CENTER);
auto start_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, start_game_off_text, start_game_on_text, 10, cury, 180,
30, UIF_FIT | UIF_CENTER);
cury += 18;
// Option button
int option_button = id;
void *option_hs = DLLHotSpotCreate(main_wnd, id++, KEY_O, multiplayer_opts_off_text, multiplayer_opts_on_text, 10,
cury, 180, 30, UIF_FIT | UIF_CENTER);
auto option_hs = DLLHotSpotCreate(main_wnd, id++, KEY_O, multiplayer_opts_off_text, multiplayer_opts_on_text, 10,
cury, 180, 30, UIF_FIT | UIF_CENTER);
cury += 18;
// cancel button
int save_button = id;
void *save_hs = DLLHotSpotCreate(main_wnd, id++, 0, save_settings_txt_off, save_settings_txt_on, 10, cury, 180, 30,
UIF_FIT | UIF_CENTER);
auto save_hs = DLLHotSpotCreate(main_wnd, id++, 0, save_settings_txt_off, save_settings_txt_on, 10, cury, 180, 30,
UIF_FIT | UIF_CENTER);
cury += 18;
int load_button = id;
void *load_hs = DLLHotSpotCreate(main_wnd, id++, 0, load_settings_txt_off, load_settings_txt_on, 10, cury, 180, 30,
UIF_FIT | UIF_CENTER);
auto load_hs = DLLHotSpotCreate(main_wnd, id++, 0, load_settings_txt_off, load_settings_txt_on, 10, cury, 180, 30,
UIF_FIT | UIF_CENTER);
cury += 18;
int cancel_button = UID_CANCEL;
void *cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, exit_off_text, exit_on_text, 10, cury, 180, 30,
UIF_FIT | UIF_CENTER);
auto cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, exit_off_text, exit_on_text, 10, cury, 180, 30,
UIF_FIT | UIF_CENTER);
// put the multiplayer dll's into the listbox
char buffer[_MAX_PATH];
@ -1065,9 +1067,9 @@ int StartMultiplayerGameMenu() {
#endif
const char *p;
#else
void *msn_single_ti = DLLCreateNewUITextItem("Polaris", UICOL_LISTBOX_LO);
void *msn_multi_ti = DLLCreateNewUITextItem("The Core", UICOL_LISTBOX_LO);
void *msn_multi_2 = DLLCreateNewUITextItem("Taurus", UICOL_LISTBOX_LO);
auto msn_single_ti = DLLCreateNewUITextItem("Polaris", UICOL_LISTBOX_LO);
auto msn_multi_ti = DLLCreateNewUITextItem("The Core", UICOL_LISTBOX_LO);
auto msn_multi_2 = DLLCreateNewUITextItem("Taurus", UICOL_LISTBOX_LO);
DLLListAddItem(list_1, msn_single_ti);
DLLListAddItem(list_1, msn_multi_ti);
DLLListAddItem(list_1, msn_multi_2);

View File

@ -406,19 +406,19 @@ namespace lanclient {
int MainMultiplayerMenu() {
char selgame[200] = "";
void *join_LC_text = DLLCreateNewUITextItem(TXT_LC_RETURNMAIN, GR_BLACK); // return_menu
void *list_head_txt = DLLCreateNewUITextItem(TXT_LC_GAMELISTHDR, UICOL_TEXT_NORMAL);
void *exit_on_text = DLLCreateNewUITextItem(TXT_LC_EXIT, UICOL_HOTSPOT_HI);
void *exit_off_text = DLLCreateNewUITextItem(TXT_LC_EXIT, UICOL_HOTSPOT_LO);
void *join_on_text = DLLCreateNewUITextItem(TXT_LC_JOINSEL, UICOL_HOTSPOT_HI);
void *join_off_text = DLLCreateNewUITextItem(TXT_LC_JOINSEL, UICOL_HOTSPOT_LO);
void *start_on_text = DLLCreateNewUITextItem(TXT_LC_STARTNEW, UICOL_HOTSPOT_HI);
void *start_off_text = DLLCreateNewUITextItem(TXT_LC_STARTNEW, UICOL_HOTSPOT_LO);
void *srch_on_text = DLLCreateNewUITextItem(TXT_LC_SRCHADDR, UICOL_HOTSPOT_HI);
void *srch_off_text = DLLCreateNewUITextItem(TXT_LC_SRCHADDR, UICOL_HOTSPOT_LO);
void *scan_on_text = DLLCreateNewUITextItem(TXT_LC_SCANLOCAL, UICOL_HOTSPOT_HI);
void *scan_off_text = DLLCreateNewUITextItem(TXT_LC_SCANLOCAL, UICOL_HOTSPOT_LO);
void *game_hdr_text = DLLCreateNewUITextItem(TXT_LC_GAMEHEADER, UICOL_WINDOW_TITLE, DLL_BIG_BRIEFING_FONT);
auto join_LC_text = DLLCreateNewUITextItem(TXT_LC_RETURNMAIN, GR_BLACK); // return_menu
auto list_head_txt = DLLCreateNewUITextItem(TXT_LC_GAMELISTHDR, UICOL_TEXT_NORMAL);
auto exit_on_text = DLLCreateNewUITextItem(TXT_LC_EXIT, UICOL_HOTSPOT_HI);
auto exit_off_text = DLLCreateNewUITextItem(TXT_LC_EXIT, UICOL_HOTSPOT_LO);
auto join_on_text = DLLCreateNewUITextItem(TXT_LC_JOINSEL, UICOL_HOTSPOT_HI);
auto join_off_text = DLLCreateNewUITextItem(TXT_LC_JOINSEL, UICOL_HOTSPOT_LO);
auto start_on_text = DLLCreateNewUITextItem(TXT_LC_STARTNEW, UICOL_HOTSPOT_HI);
auto start_off_text = DLLCreateNewUITextItem(TXT_LC_STARTNEW, UICOL_HOTSPOT_LO);
auto srch_on_text = DLLCreateNewUITextItem(TXT_LC_SRCHADDR, UICOL_HOTSPOT_HI);
auto srch_off_text = DLLCreateNewUITextItem(TXT_LC_SRCHADDR, UICOL_HOTSPOT_LO);
auto scan_on_text = DLLCreateNewUITextItem(TXT_LC_SCANLOCAL, UICOL_HOTSPOT_HI);
auto scan_off_text = DLLCreateNewUITextItem(TXT_LC_SCANLOCAL, UICOL_HOTSPOT_LO);
auto game_hdr_text = DLLCreateNewUITextItem(TXT_LC_GAMEHEADER, UICOL_WINDOW_TITLE, DLL_BIG_BRIEFING_FONT);
int exit_menu = 0;
void *net_game_txt_items[MAX_NET_GAMES];
@ -432,27 +432,27 @@ int MainMultiplayerMenu() {
DLLSetScreenMode(SM_MENU);
*DLLNewUIWindow_alpha = 255;
void *main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL);
auto main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL);
void *info_on_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_HI);
void *info_hs = DLLHotSpotCreate(main_wnd, GET_INFO_ID, KEY_I, info_on_text, info_on_text, 1, 1, 1, 1, 0);
auto info_on_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_HI);
auto info_hs = DLLHotSpotCreate(main_wnd, GET_INFO_ID, KEY_I, info_on_text, info_on_text, 1, 1, 1, 1, 0);
void *screen_header = DLLTextCreate(main_wnd, game_hdr_text, 45, cury, UIF_CENTER);
auto screen_header = DLLTextCreate(main_wnd, game_hdr_text, 45, cury, UIF_CENTER);
cury += 35;
void *start_hs = DLLHotSpotCreate(main_wnd, 7, KEY_S, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTER);
auto start_hs = DLLHotSpotCreate(main_wnd, 7, KEY_S, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTER);
cury += 25;
void *srch_hs = DLLHotSpotCreate(main_wnd, 9, KEY_A, srch_off_text, srch_on_text, 320, cury, 250, 15, UIF_CENTER);
auto srch_hs = DLLHotSpotCreate(main_wnd, 9, KEY_A, srch_off_text, srch_on_text, 320, cury, 250, 15, UIF_CENTER);
cury += 25;
void *edit_box = DLLEditCreate(main_wnd, 9, 10, cury, 300, 15, UIF_CENTER);
auto edit_box = DLLEditCreate(main_wnd, 9, 10, cury, 300, 15, UIF_CENTER);
cury += 35;
void *scan_hs = DLLHotSpotCreate(main_wnd, 8, KEY_L, scan_off_text, scan_on_text, 320, cury, 200, 15, UIF_CENTER);
auto scan_hs = DLLHotSpotCreate(main_wnd, 8, KEY_L, scan_off_text, scan_on_text, 320, cury, 200, 15, UIF_CENTER);
cury += 50;
void *list_header = DLLTextCreate(main_wnd, list_head_txt, 45, cury, 0);
auto list_header = DLLTextCreate(main_wnd, list_head_txt, 45, cury, 0);
cury += 13;
void *main_list = DLLListCreate(main_wnd, UID_OK, 10, cury, 600, 170, UIF_CENTER | UILB_NOSORT);
auto main_list = DLLListCreate(main_wnd, UID_OK, 10, cury, 600, 170, UIF_CENTER | UILB_NOSORT);
cury += 200;
void *join_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, join_off_text, join_on_text, 100, cury, 130, 15, 0);
void *exit_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, exit_off_text, exit_on_text, 400, cury, 70, 15, 0);
auto join_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, join_off_text, join_on_text, 100, cury, 130, 15, 0);
auto exit_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, exit_off_text, exit_on_text, 400, cury, 70, 15, 0);
char szdip[30] = "";
int diplen = 29;
DLLDatabaseRead("DirectIP", szdip, &diplen);

View File

@ -824,21 +824,21 @@ void DLLFUNCCALL DLLMultiCall(int eventnum) {
int LoginMasterTracker() {
void *title_text = DLLCreateNewUITextItem(TXT_PXO_LOGINMASTERTRKR, UICOL_WINDOW_TITLE);
void *cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI);
void *login_on_text = DLLCreateNewUITextItem(TXT_PXO_LOGIN, UICOL_HOTSPOT_HI);
auto title_text = DLLCreateNewUITextItem(TXT_PXO_LOGINMASTERTRKR, UICOL_WINDOW_TITLE);
auto cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI);
auto login_on_text = DLLCreateNewUITextItem(TXT_PXO_LOGIN, UICOL_HOTSPOT_HI);
void *cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO);
void *login_off_text = DLLCreateNewUITextItem(TXT_PXO_LOGIN, UICOL_HOTSPOT_LO);
auto cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO);
auto login_off_text = DLLCreateNewUITextItem(TXT_PXO_LOGIN, UICOL_HOTSPOT_LO);
void *login_id_text = DLLCreateNewUITextItem(TXT_PXO_LOGINID, UICOL_TEXT_NORMAL);
void *tracker_id_text = DLLCreateNewUITextItem(TXT_PXO_TRACKERID, UICOL_TEXT_NORMAL);
void *password_text = DLLCreateNewUITextItem(TXT_PXO_PASSWORD, UICOL_TEXT_NORMAL);
auto login_id_text = DLLCreateNewUITextItem(TXT_PXO_LOGINID, UICOL_TEXT_NORMAL);
auto tracker_id_text = DLLCreateNewUITextItem(TXT_PXO_TRACKERID, UICOL_TEXT_NORMAL);
auto password_text = DLLCreateNewUITextItem(TXT_PXO_PASSWORD, UICOL_TEXT_NORMAL);
void *new_prof_on_text = DLLCreateNewUITextItem(TXT_PXO_CREATENEWPROFILE, UICOL_HOTSPOT_HI);
void *new_prof_off_text = DLLCreateNewUITextItem(TXT_PXO_CREATENEWPROFILE, UICOL_HOTSPOT_LO);
auto new_prof_on_text = DLLCreateNewUITextItem(TXT_PXO_CREATENEWPROFILE, UICOL_HOTSPOT_HI);
auto new_prof_off_text = DLLCreateNewUITextItem(TXT_PXO_CREATENEWPROFILE, UICOL_HOTSPOT_LO);
void *blank_text = DLLCreateNewUITextItem(TXT_PXO_BLANK, GR_BLACK);
auto blank_text = DLLCreateNewUITextItem(TXT_PXO_BLANK, GR_BLACK);
int exit_menu = 0;
int ret = 0;
@ -846,26 +846,26 @@ int LoginMasterTracker() {
int loginlen = LOGIN_LEN;
int passlen = PASSWORD_LEN;
void *main_wnd = DLLNewUIGameWindowCreate(TRACKER_MENU_X, TRACKER_MENU_Y, TRACKER_MENU_W, TRACKER_MENU_H,
UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
auto main_wnd = DLLNewUIGameWindowCreate(TRACKER_MENU_X, TRACKER_MENU_Y, TRACKER_MENU_W, TRACKER_MENU_H,
UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
void *password = DLLTextCreate(main_wnd, password_text, 30, 130, UIF_CENTER);
void *login_id = DLLTextCreate(main_wnd, login_id_text, 50, 80, UIF_CENTER);
auto password = DLLTextCreate(main_wnd, password_text, 30, 130, UIF_CENTER);
auto login_id = DLLTextCreate(main_wnd, login_id_text, 50, 80, UIF_CENTER);
void *pass_edit = DLLEditCreate(main_wnd, UID_OK, 100, 140, 130, 15, UIF_CENTER | UIED_PASSWORD);
auto pass_edit = DLLEditCreate(main_wnd, UID_OK, 100, 140, 130, 15, UIF_CENTER | UIED_PASSWORD);
void *login_hs =
auto login_hs =
DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, login_off_text, login_on_text, 60, TRACKER_MENU_H - 80, 60, 20, 0);
void *cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_off_text, cancel_on_text, 130,
TRACKER_MENU_H - 80, 60, 20, 0);
auto cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_off_text, cancel_on_text, 130,
TRACKER_MENU_H - 80, 60, 20, 0);
void *new_id_hs =
auto new_id_hs =
DLLHotSpotCreate(main_wnd, 4, KEY_N, new_prof_off_text, new_prof_on_text, 0, 45, 120, 20, UIF_CENTER | UIF_FIT);
void *login_edit = DLLEditCreate(main_wnd, 3, 100, 90, 130, 15, UIF_CENTER);
auto login_edit = DLLEditCreate(main_wnd, 3, 100, 90, 130, 15, UIF_CENTER);
// Read defaults
@ -1027,40 +1027,40 @@ int MainMultiplayerMenu() {
DLLToggleUICallback(0);
ChatStarted = 1;
void *title_text = DLLCreateNewUITextItem(TXT_PXO_CONNECTING, UICOL_WINDOW_TITLE);
auto title_text = DLLCreateNewUITextItem(TXT_PXO_CONNECTING, UICOL_WINDOW_TITLE);
void *cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI);
void *cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO);
auto cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI);
auto cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO);
void *exit_on_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_HI);
void *exit_off_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_LO);
auto exit_on_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_HI);
auto exit_off_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_LO);
void *priv_msg_on_text = DLLCreateNewUITextItem(TXT_PXO_SENDPRIV, UICOL_HOTSPOT_HI);
void *priv_msg_off_text = DLLCreateNewUITextItem(TXT_PXO_SENDPRIV, UICOL_HOTSPOT_LO);
auto priv_msg_on_text = DLLCreateNewUITextItem(TXT_PXO_SENDPRIV, UICOL_HOTSPOT_HI);
auto priv_msg_off_text = DLLCreateNewUITextItem(TXT_PXO_SENDPRIV, UICOL_HOTSPOT_LO);
void *join_lobby_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINPRIV, UICOL_HOTSPOT_HI);
void *join_lobby_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINPRIV, UICOL_HOTSPOT_LO);
auto join_lobby_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINPRIV, UICOL_HOTSPOT_HI);
auto join_lobby_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINPRIV, UICOL_HOTSPOT_LO);
void *join_chan_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINCHAN, UICOL_HOTSPOT_HI);
void *join_chan_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINCHAN, UICOL_HOTSPOT_LO);
auto join_chan_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINCHAN, UICOL_HOTSPOT_HI);
auto join_chan_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINCHAN, UICOL_HOTSPOT_LO);
void *find_pilot_on_text = DLLCreateNewUITextItem(TXT_PXO_FINDPILOT, UICOL_HOTSPOT_HI);
void *find_pilot_off_text = DLLCreateNewUITextItem(TXT_PXO_FINDPILOT, UICOL_HOTSPOT_LO);
auto find_pilot_on_text = DLLCreateNewUITextItem(TXT_PXO_FINDPILOT, UICOL_HOTSPOT_HI);
auto find_pilot_off_text = DLLCreateNewUITextItem(TXT_PXO_FINDPILOT, UICOL_HOTSPOT_LO);
void *get_pilot_on_text = DLLCreateNewUITextItem(TXT_PXO_GETPILOTINFO, UICOL_HOTSPOT_HI);
void *get_pilot_off_text = DLLCreateNewUITextItem(TXT_PXO_GETPILOTINFO, UICOL_HOTSPOT_LO);
auto get_pilot_on_text = DLLCreateNewUITextItem(TXT_PXO_GETPILOTINFO, UICOL_HOTSPOT_HI);
auto get_pilot_off_text = DLLCreateNewUITextItem(TXT_PXO_GETPILOTINFO, UICOL_HOTSPOT_LO);
void *game_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME, UICOL_HOTSPOT_HI);
void *game_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME, UICOL_HOTSPOT_LO);
auto game_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME, UICOL_HOTSPOT_HI);
auto game_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME, UICOL_HOTSPOT_LO);
void *send_on_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_HI);
void *send_off_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_LO);
auto send_on_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_HI);
auto send_off_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_LO);
char fmtlobbytext[200];
snprintf(fmtlobbytext, sizeof(fmtlobbytext), TXT_PXO_YOUAREINLOBBY, Ourlobby);
void *lobby_text = DLLCreateNewUITextItem(fmtlobbytext, UICOL_TEXT_AUX);
auto lobby_text = DLLCreateNewUITextItem(fmtlobbytext, UICOL_TEXT_AUX);
void *blank_text = DLLCreateNewUITextItem(TXT_PXO_BLANK, UICOL_TEXT_AUX);
auto blank_text = DLLCreateNewUITextItem(TXT_PXO_BLANK, UICOL_TEXT_AUX);
char sendline[MAX_CHAT_SEND_LEN];
int exit_menu = 0;
int ret = 0;
@ -1069,8 +1069,8 @@ int MainMultiplayerMenu() {
int i;
float lastlisttime = 0;
float lastchanlisttime = 0;
void *chan_ti[MAX_CHAT_CHANNELS];
void *user_ti[CHAT_MAX_USERLIST];
UIItem *chan_ti[MAX_CHAT_CHANNELS];
UIItem *user_ti[CHAT_MAX_USERLIST];
char selpilot[MAX_CHAT_SEND_LEN];
char oldselchan[200];
for (i = 0; i < MAX_CHAT_CHANNELS; i++)
@ -1090,40 +1090,40 @@ int MainMultiplayerMenu() {
}
// Create our buttons
void *main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL);
auto main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL);
// void HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w,
// int h, int flags,int winnum)
/* void *exit_hs = */ DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 33, 427, 70, 15, 0);
/* auto exit_hs = */ DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 33, 427, 70, 15, 0);
void *priv_hs = DLLHotSpotCreate(main_wnd, 6, 0, priv_msg_off_text, priv_msg_on_text, 328, 403, 170, 15, 0);
auto priv_hs = DLLHotSpotCreate(main_wnd, 6, 0, priv_msg_off_text, priv_msg_on_text, 328, 403, 170, 15, 0);
#define JOIN_ROW 131
void *join_lobby_hs =
auto join_lobby_hs =
DLLHotSpotCreate(main_wnd, 7, 0, join_lobby_off_text, join_lobby_on_text, 400, JOIN_ROW, 170, 15, 0);
void *join_chan_hs =
auto join_chan_hs =
DLLHotSpotCreate(main_wnd, 14, 0, join_chan_off_text, join_chan_on_text, 178, JOIN_ROW, 170, 15, 0);
void *find_hs = DLLHotSpotCreate(main_wnd, 9, 0, find_pilot_off_text, find_pilot_on_text, 156, 403, 140, 15, 0);
void *get_pilot_hs =
auto find_hs = DLLHotSpotCreate(main_wnd, 9, 0, find_pilot_off_text, find_pilot_on_text, 156, 403, 140, 15, 0);
auto get_pilot_hs =
DLLHotSpotCreate(main_wnd, 10, 0, get_pilot_off_text, get_pilot_on_text, colx1 + 10, 372, 130, 15, 0);
void *game_hs = DLLHotSpotCreate(main_wnd, 11, 0, game_off_text, game_on_text, 505, 431, 135, 15, 0);
auto game_hs = DLLHotSpotCreate(main_wnd, 11, 0, game_off_text, game_on_text, 505, 431, 135, 15, 0);
void *enter_hs = DLLHotSpotCreate(main_wnd, 15, KEY_ENTER, send_off_text, send_on_text, 550, 370, 70, 15, 0);
auto enter_hs = DLLHotSpotCreate(main_wnd, 15, KEY_ENTER, send_off_text, send_on_text, 550, 370, 70, 15, 0);
// lobby_text
void *lobby_txt_gadget = DLLTextCreate(main_wnd, lobby_text, 200, 450, UIF_CENTER);
auto lobby_txt_gadget = DLLTextCreate(main_wnd, lobby_text, 200, 450, UIF_CENTER);
// User list box, id #10
void *user_list = DLLOldListCreate(main_wnd, 10, colx1 + 20, 100, 108, 265, 0);
auto user_list = DLLOldListCreate(main_wnd, 10, colx1 + 20, 100, 108, 265, 0);
// Channel list box, id #14
void *chan_list = DLLOldListCreate(main_wnd, 14, colx2, 25, 470, 96, 0);
auto chan_list = DLLOldListCreate(main_wnd, 14, colx2, 25, 470, 96, 0);
// Edit box for typing in chat, id # 15
void *send_edit = DLLOldEditCreate(main_wnd, 15, colx2 + 10, 372, 390, 20, UIED_AUTOSELECT);
auto send_edit = DLLOldEditCreate(main_wnd, 15, colx2 + 10, 372, 390, 20, UIED_AUTOSELECT);
DLLNewUIWindowLoadBackgroundImage(main_wnd, "pxomain.ogf");
DLLSetOldEditBufferLen(send_edit, 100);
void *console_item = DLLUIConsoleGadgetCreate(main_wnd, 16, colx2, 165, 0, 51, 16, 0);
auto console_item = DLLUIConsoleGadgetCreate(main_wnd, 16, colx2, 165, 0, 51, 16, 0);
pconsole = console_item;
DLLNewUIWindowOpen(main_wnd);
@ -1251,9 +1251,9 @@ int MainMultiplayerMenu() {
oldseluser[0] = 0;
if (oldsel)
strcpy(oldseluser, oldsel);
void *old_ti = nullptr; // = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME,GR_WHITE);
UIItem *old_ti = nullptr; // = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME,GR_WHITE);
// int oldsel = DLLOldListGetSelectedIndex(user_list);
// void * old_ti =
// UIItem * old_ti =
DLLOldListRemoveAll(user_list);
for (i = 0; i < CHAT_MAX_USERLIST; i++) {
@ -1736,45 +1736,44 @@ int SearchMasterTrackerGameMenu() {
int i = 0;
float last_req_time;
char selgame[200];
void *return_text_on = DLLCreateNewUITextItem(TXT_PXO_RETURNTOCHAT, UICOL_HOTSPOT_HI);
void *return_text_off = DLLCreateNewUITextItem(TXT_PXO_RETURNTOCHAT, UICOL_HOTSPOT_LO);
void *game_head_text = DLLCreateNewUITextItem(TXT_PXO_GAMELISTHDR, UICOL_TEXT_NORMAL);
void *exit_on_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_HI);
void *exit_off_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_LO);
void *join_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINSEL, UICOL_HOTSPOT_HI);
void *join_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINSEL, UICOL_HOTSPOT_LO);
void *start_on_text = DLLCreateNewUITextItem(TXT_PXO_STARTNEW, UICOL_HOTSPOT_HI);
void *start_off_text = DLLCreateNewUITextItem(TXT_PXO_STARTNEW, UICOL_HOTSPOT_LO);
auto return_text_on = DLLCreateNewUITextItem(TXT_PXO_RETURNTOCHAT, UICOL_HOTSPOT_HI);
auto return_text_off = DLLCreateNewUITextItem(TXT_PXO_RETURNTOCHAT, UICOL_HOTSPOT_LO);
auto game_head_text = DLLCreateNewUITextItem(TXT_PXO_GAMELISTHDR, UICOL_TEXT_NORMAL);
auto exit_on_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_HI);
auto exit_off_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_LO);
auto join_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINSEL, UICOL_HOTSPOT_HI);
auto join_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINSEL, UICOL_HOTSPOT_LO);
auto start_on_text = DLLCreateNewUITextItem(TXT_PXO_STARTNEW, UICOL_HOTSPOT_HI);
auto start_off_text = DLLCreateNewUITextItem(TXT_PXO_STARTNEW, UICOL_HOTSPOT_LO);
void *gname_on_text = DLLCreateNewUITextItem(TXT_PXO_GAMENAME2, UICOL_HOTSPOT_HI);
void *gname_off_text = DLLCreateNewUITextItem(TXT_PXO_GAMENAME2, UICOL_HOTSPOT_LO);
void *gtype_on_text = DLLCreateNewUITextItem(TXT_PXO_GAMETYPE, UICOL_HOTSPOT_HI);
void *gtype_off_text = DLLCreateNewUITextItem(TXT_PXO_GAMETYPE, UICOL_HOTSPOT_LO);
void *msn_on_text = DLLCreateNewUITextItem(TXT_PXO_MISSION, UICOL_HOTSPOT_HI);
void *msn_off_text = DLLCreateNewUITextItem(TXT_PXO_MISSION, UICOL_HOTSPOT_LO);
void *lvl_on_text = DLLCreateNewUITextItem(TXT_PXO_LEVEL, UICOL_HOTSPOT_HI);
void *lvl_off_text = DLLCreateNewUITextItem(TXT_PXO_LEVEL, UICOL_HOTSPOT_LO);
void *plrs_on_text = DLLCreateNewUITextItem(TXT_PXO_PLAYERS, UICOL_HOTSPOT_HI);
void *plrs_off_text = DLLCreateNewUITextItem(TXT_PXO_PLAYERS, UICOL_HOTSPOT_LO);
void *ping_on_text = DLLCreateNewUITextItem(TXT_PXO_PING, UICOL_HOTSPOT_HI);
void *ping_off_text = DLLCreateNewUITextItem(TXT_PXO_PING, UICOL_HOTSPOT_LO);
auto gname_on_text = DLLCreateNewUITextItem(TXT_PXO_GAMENAME2, UICOL_HOTSPOT_HI);
auto gname_off_text = DLLCreateNewUITextItem(TXT_PXO_GAMENAME2, UICOL_HOTSPOT_LO);
auto gtype_on_text = DLLCreateNewUITextItem(TXT_PXO_GAMETYPE, UICOL_HOTSPOT_HI);
auto gtype_off_text = DLLCreateNewUITextItem(TXT_PXO_GAMETYPE, UICOL_HOTSPOT_LO);
auto msn_on_text = DLLCreateNewUITextItem(TXT_PXO_MISSION, UICOL_HOTSPOT_HI);
auto msn_off_text = DLLCreateNewUITextItem(TXT_PXO_MISSION, UICOL_HOTSPOT_LO);
auto lvl_on_text = DLLCreateNewUITextItem(TXT_PXO_LEVEL, UICOL_HOTSPOT_HI);
auto lvl_off_text = DLLCreateNewUITextItem(TXT_PXO_LEVEL, UICOL_HOTSPOT_LO);
auto plrs_on_text = DLLCreateNewUITextItem(TXT_PXO_PLAYERS, UICOL_HOTSPOT_HI);
auto plrs_off_text = DLLCreateNewUITextItem(TXT_PXO_PLAYERS, UICOL_HOTSPOT_LO);
auto ping_on_text = DLLCreateNewUITextItem(TXT_PXO_PING, UICOL_HOTSPOT_HI);
auto ping_off_text = DLLCreateNewUITextItem(TXT_PXO_PING, UICOL_HOTSPOT_LO);
char fmt_textstr[200];
snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULT, 28);
void *default_on_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_HI);
auto default_on_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_HI);
snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULT, 28);
void *default_off_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_LO);
void *game_hdr_text = DLLCreateNewUITextItem(TXT_PXO_GAME_HDR, UICOL_WINDOW_TITLE);
auto default_off_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_LO);
auto game_hdr_text = DLLCreateNewUITextItem(TXT_PXO_GAME_HDR, UICOL_WINDOW_TITLE);
void *info_on_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_HI);
void *info_off_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_LO);
auto info_on_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_HI);
auto info_off_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_LO);
memset(PXOGamelist, 0, sizeof(PXOGamelist));
NextGameItemNo = 0;
void *return_hs;
void *set_dft_hs;
UIObject *set_dft_hs;
void *net_game_txt_items[MAX_NET_GAMES];
int a;
@ -1786,16 +1785,16 @@ int SearchMasterTrackerGameMenu() {
DLLSetScreenMode(SM_MENU);
*DLLNewUIWindow_alpha = 255;
void *main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL);
auto main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL);
void *screen_header = DLLTextCreate(main_wnd, game_hdr_text, 5, 15, UIF_CENTER);
auto screen_header = DLLTextCreate(main_wnd, game_hdr_text, 5, 15, UIF_CENTER);
cury += 30;
void *start_hs = DLLHotSpotCreate(main_wnd, 7, KEY_S, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTER);
auto start_hs = DLLHotSpotCreate(main_wnd, 7, KEY_S, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTER);
cury += 30; // 25;
int setdfty;
return_hs = DLLHotSpotCreate(main_wnd, 8, KEY_R, return_text_off, return_text_on, 490, cury, 250, 15, UIF_CENTER);
auto return_hs = DLLHotSpotCreate(main_wnd, 8, KEY_R, return_text_off, return_text_on, 490, cury, 250, 15, UIF_CENTER);
cury += 20;
if (Bypass_chat) {
@ -1816,28 +1815,28 @@ int SearchMasterTrackerGameMenu() {
set_dft_hs = DLLHotSpotCreate(main_wnd, 9, 0, default_off_text, default_on_text, 490, cury, 300, 15, UIF_CENTER);
cury += 30;
}
// void * game_head = DLLTextCreate(main_wnd,game_head_text,45,cury,0);
// auto game_head = DLLTextCreate(main_wnd,game_head_text,45,cury,0);
void *gname_hs = DLLHotSpotCreate(main_wnd, SORT_GAMENAME, 0, gname_off_text, gname_on_text, 44, cury,
DLLgrtext_GetTextLineWidth(TXT_PXO_GAMENAME2) + 1, 15, 0);
void *gtype_hs = DLLHotSpotCreate(main_wnd, SORT_GAMETYPE, 0, gtype_off_text, gtype_on_text, 215, cury,
DLLgrtext_GetTextLineWidth(TXT_PXO_GAMETYPE) + 1, 15, 0);
void *msn_hs = DLLHotSpotCreate(main_wnd, SORT_MISSION, 0, msn_off_text, msn_on_text, 320, cury,
DLLgrtext_GetTextLineWidth(TXT_PXO_MISSION) + 1, 15, 0);
void *lvl_hs = DLLHotSpotCreate(main_wnd, SORT_LEVEL, 0, lvl_off_text, lvl_on_text, 428, cury,
DLLgrtext_GetTextLineWidth(TXT_PXO_LEVEL) + 1, 15, 0);
void *players_hs = DLLHotSpotCreate(main_wnd, SORT_PLAYERS, 0, plrs_off_text, plrs_on_text, 479, cury,
DLLgrtext_GetTextLineWidth(TXT_PXO_PLAYERS) + 1, 15, 0);
void *ping_hs = DLLHotSpotCreate(main_wnd, SORT_PING, 0, ping_off_text, ping_on_text, 549, cury,
DLLgrtext_GetTextLineWidth(TXT_PXO_PING) + 1, 15, 0);
auto gname_hs = DLLHotSpotCreate(main_wnd, SORT_GAMENAME, 0, gname_off_text, gname_on_text, 44, cury,
DLLgrtext_GetTextLineWidth(TXT_PXO_GAMENAME2) + 1, 15, 0);
auto gtype_hs = DLLHotSpotCreate(main_wnd, SORT_GAMETYPE, 0, gtype_off_text, gtype_on_text, 215, cury,
DLLgrtext_GetTextLineWidth(TXT_PXO_GAMETYPE) + 1, 15, 0);
auto msn_hs = DLLHotSpotCreate(main_wnd, SORT_MISSION, 0, msn_off_text, msn_on_text, 320, cury,
DLLgrtext_GetTextLineWidth(TXT_PXO_MISSION) + 1, 15, 0);
auto lvl_hs = DLLHotSpotCreate(main_wnd, SORT_LEVEL, 0, lvl_off_text, lvl_on_text, 428, cury,
DLLgrtext_GetTextLineWidth(TXT_PXO_LEVEL) + 1, 15, 0);
auto players_hs = DLLHotSpotCreate(main_wnd, SORT_PLAYERS, 0, plrs_off_text, plrs_on_text, 479, cury,
DLLgrtext_GetTextLineWidth(TXT_PXO_PLAYERS) + 1, 15, 0);
auto ping_hs = DLLHotSpotCreate(main_wnd, SORT_PING, 0, ping_off_text, ping_on_text, 549, cury,
DLLgrtext_GetTextLineWidth(TXT_PXO_PING) + 1, 15, 0);
cury += 15;
void *game_list = DLLListCreate(main_wnd, 6, 10, cury, 600, 230, UIF_CENTER | UILB_NOSORT);
auto game_list = DLLListCreate(main_wnd, 6, 10, cury, 600, 230, UIF_CENTER | UILB_NOSORT);
cury += 260;
void *join_hs = DLLHotSpotCreate(main_wnd, 6, KEY_ENTER, join_off_text, join_on_text, 100, cury, 130, 15, 0);
void *exit_hs = DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 400, cury, 70, 15, 0);
auto join_hs = DLLHotSpotCreate(main_wnd, 6, KEY_ENTER, join_off_text, join_on_text, 100, cury, 130, 15, 0);
auto exit_hs = DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 400, cury, 70, 15, 0);
void *info_hs = DLLHotSpotCreate(main_wnd, GET_INFO_ID, KEY_I, info_off_text, info_on_text, 1, 1, 1, 1, 0);
auto info_hs = DLLHotSpotCreate(main_wnd, GET_INFO_ID, KEY_I, info_off_text, info_on_text, 1, 1, 1, 1, 0);
DLLNewUIWindowLoadBackgroundImage(main_wnd, "pxogame.ogf");
DLLNewUIWindowOpen(main_wnd);
@ -2301,14 +2300,14 @@ int JoinNewLobby(const char *lobby) {
int rcode;
const char *p;
DLLmprintf(0, "Entering new lobby");
void *title_text = DLLCreateNewUITextItem(TXT_PXO_ENTERINGLOBBY, UICOL_WINDOW_TITLE);
auto title_text = DLLCreateNewUITextItem(TXT_PXO_ENTERINGLOBBY, UICOL_WINDOW_TITLE);
void *cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI);
void *cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO);
auto cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI);
auto cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO);
void *main_wnd = DLLNewUIGameWindowCreate(0, 256, 128, 128, UIF_CENTER | UIF_PROCESS_ALL | NUWF_TITLEMED);
void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
void *cancel_hs =
auto main_wnd = DLLNewUIGameWindowCreate(0, 256, 128, 128, UIF_CENTER | UIF_PROCESS_ALL | NUWF_TITLEMED);
auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
auto cancel_hs =
DLLHotSpotCreate(main_wnd, 5, KEY_ESC, cancel_off_text, cancel_on_text, 20, 100, 70, 15, UIF_CENTER);
DLLNewUIGameWindowOpen(main_wnd);
do {
@ -2357,29 +2356,29 @@ const char *SendWhisper(const char *name) {
char message[MAX_CHAT_SEND_LEN];
char pilot_name[MAX_CHAT_SEND_LEN];
static char fmt_msg[MAX_CHAT_SEND_LEN * 2];
void *title_text = DLLCreateNewUITextItem(TXT_PXO_PRIVATEMESSAGE, UICOL_WINDOW_TITLE);
auto title_text = DLLCreateNewUITextItem(TXT_PXO_PRIVATEMESSAGE, UICOL_WINDOW_TITLE);
void *cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI);
void *cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO);
void *send_on_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_HI);
void *send_off_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_LO);
auto cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI);
auto cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO);
auto send_on_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_HI);
auto send_off_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_LO);
void *pilot_text = DLLCreateNewUITextItem(TXT_PXO_PILOTNAME, UICOL_TEXT_NORMAL);
void *message_text = DLLCreateNewUITextItem(TXT_PXO_MESSAGE, UICOL_TEXT_NORMAL);
auto pilot_text = DLLCreateNewUITextItem(TXT_PXO_PILOTNAME, UICOL_TEXT_NORMAL);
auto message_text = DLLCreateNewUITextItem(TXT_PXO_MESSAGE, UICOL_TEXT_NORMAL);
void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 384, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 384, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
void *pilot = DLLTextCreate(main_wnd, pilot_text, 50, 55, 0);
void *message_t = DLLTextCreate(main_wnd, message_text, 50, 110, 0);
void *user_edit = DLLEditCreate(main_wnd, 10, 50, 75, 130, 15, 0);
void *msg_edit = DLLEditCreate(main_wnd, 3, 50, 130, 200, 15, 0);
auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
auto pilot = DLLTextCreate(main_wnd, pilot_text, 50, 55, 0);
auto message_t = DLLTextCreate(main_wnd, message_text, 50, 110, 0);
auto user_edit = DLLEditCreate(main_wnd, 10, 50, 75, 130, 15, 0);
auto msg_edit = DLLEditCreate(main_wnd, 3, 50, 130, 200, 15, 0);
// HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h,
// int flags,int winnum)
void *cancel_hs =
auto cancel_hs =
DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0);
void *send_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, send_on_text, send_off_text, 60, 256 - 80, 60, 20, 0);
auto send_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, send_on_text, send_off_text, 60, 256 - 80, 60, 20, 0);
DLLNewUIGameWindowOpen(main_wnd);
// DLLNewUIWindowSetFocusOnEditGadget(msg_edit,main_wnd);
DLLEditSetText(user_edit, name);
@ -2440,27 +2439,27 @@ int JoinPrivateLobby() {
char message[MAX_CHAT_SEND_LEN];
char priv_channel[MAX_CHAT_SEND_LEN];
void *title_text = DLLCreateNewUITextItem(TXT_PXO_JOINPRIV, UICOL_WINDOW_TITLE);
auto title_text = DLLCreateNewUITextItem(TXT_PXO_JOINPRIV, UICOL_WINDOW_TITLE);
void *cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI);
void *cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO);
void *join_on_text = DLLCreateNewUITextItem(TXT_PXO_JOIN, UICOL_HOTSPOT_HI);
void *join_off_text = DLLCreateNewUITextItem(TXT_PXO_JOIN, UICOL_HOTSPOT_LO);
auto cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI);
auto cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO);
auto join_on_text = DLLCreateNewUITextItem(TXT_PXO_JOIN, UICOL_HOTSPOT_HI);
auto join_off_text = DLLCreateNewUITextItem(TXT_PXO_JOIN, UICOL_HOTSPOT_LO);
void *channel_text = DLLCreateNewUITextItem(TXT_PXO_CHANNELNAME, UICOL_TEXT_NORMAL);
auto channel_text = DLLCreateNewUITextItem(TXT_PXO_CHANNELNAME, UICOL_TEXT_NORMAL);
void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLELARGE);
auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLELARGE);
void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
void *channel_t = DLLTextCreate(main_wnd, channel_text, 50, 95, UIF_CENTER);
void *chan_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER);
auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
auto channel_t = DLLTextCreate(main_wnd, channel_text, 50, 95, UIF_CENTER);
auto chan_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER);
// DLLNewUIWindowSetFocusOnEditGadget(chan_edit,main_wnd);
// HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h,
// int flags,int winnum)
void *cancel_hs =
auto cancel_hs =
DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0);
void *join_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, join_on_text, join_off_text, 60, 256 - 80, 60, 20, 0);
auto join_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, join_on_text, join_off_text, 60, 256 - 80, 60, 20, 0);
DLLNewUIGameWindowOpen(main_wnd);
while (!exit_menu) {
int res;
@ -2527,27 +2526,27 @@ int FindPilot() {
char message[MAX_CHAT_SEND_LEN];
char pilot_name[MAX_CHAT_SEND_LEN];
static char fmt_msg[MAX_CHAT_SEND_LEN * 2];
void *title_text = DLLCreateNewUITextItem(TXT_PXO_FINDPILOT, UICOL_WINDOW_TITLE);
auto title_text = DLLCreateNewUITextItem(TXT_PXO_FINDPILOT, UICOL_WINDOW_TITLE);
void *cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI);
void *cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO);
void *search_on_text = DLLCreateNewUITextItem(TXT_PXO_SEARCH, UICOL_HOTSPOT_HI);
void *search_off_text = DLLCreateNewUITextItem(TXT_PXO_SEARCH, UICOL_HOTSPOT_LO);
auto cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI);
auto cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO);
auto search_on_text = DLLCreateNewUITextItem(TXT_PXO_SEARCH, UICOL_HOTSPOT_HI);
auto search_off_text = DLLCreateNewUITextItem(TXT_PXO_SEARCH, UICOL_HOTSPOT_LO);
void *pilot_text = DLLCreateNewUITextItem(TXT_PXO_PILOTNAME, UICOL_TEXT_NORMAL);
auto pilot_text = DLLCreateNewUITextItem(TXT_PXO_PILOTNAME, UICOL_TEXT_NORMAL);
void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
void *title_t = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
void *pilot_t = DLLTextCreate(main_wnd, pilot_text, 50, 95, UIF_CENTER);
void *pilot_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER);
auto title_t = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER);
auto pilot_t = DLLTextCreate(main_wnd, pilot_text, 50, 95, UIF_CENTER);
auto pilot_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER);
// DLLNewUIWindowSetFocusOnEditGadget(pilot_edit,main_wnd);
// HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h,
// int flags,int winnum)
void *cancel_hs =
auto cancel_hs =
DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0);
void *search_hs =
auto search_hs =
DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, search_on_text, search_off_text, 60, 256 - 80, 60, 20, 0);
DLLNewUIGameWindowOpen(main_wnd);
while (!exit_menu) {
@ -2685,26 +2684,26 @@ int GetPilotStats(const char *pilot) {
char tmp_text[MAX_CHAT_SEND_LEN];
vmt_descent3_struct d3_pilot_info;
void *eff_text;
void *time_text;
void *main_wnd;
void *title_t;
void *kill_t;
void *death_t;
void *suicide_t;
void *eff_t;
void *time_in_game_t;
void *pilot_t;
void *rank_t;
UIItem *eff_text;
UIItem *time_text;
UIObject *main_wnd;
UIObject *title_t;
UIObject *kill_t;
UIObject *death_t;
UIObject *suicide_t;
UIObject *eff_t;
UIObject *time_in_game_t;
UIObject *pilot_t;
UIObject *rank_t;
void *title_text;
void *pilot_name_text;
void *close_on_text;
void *close_off_text;
void *kills_text;
void *deaths_text;
void *suicide_text;
void *rank_text;
UIItem *title_text;
UIItem *pilot_name_text;
UIItem *close_on_text;
UIItem *close_off_text;
UIItem *kills_text;
UIItem *deaths_text;
UIItem *suicide_text;
UIItem *rank_text;
DLLCreateSplashScreen(TXT_PXO_GETTINGPILOTSTAT, 1);
// Cancel previously active lookups
@ -3014,8 +3013,7 @@ int ShowMessageOfTheDay(void) {
int motdlen = MAX_MOTD_LEN;
int res;
int rval = 0;
static void *main_wnd;
void *close_hs;
static UIObject *main_wnd;
int last_motd_version = 0;
@ -3029,17 +3027,17 @@ int ShowMessageOfTheDay(void) {
DLLDatabaseWriteInt("MOTDVersion", Motd_version);
void *close_on_text = DLLCreateNewUITextItem(TXT_PXO_CLOSE, UICOL_HOTSPOT_HI);
void *close_off_text = DLLCreateNewUITextItem(TXT_PXO_CLOSE, UICOL_HOTSPOT_LO);
void *motd_text = DLLCreateNewUITextItem("PXO Message of the day", UICOL_WINDOW_TITLE);
auto close_on_text = DLLCreateNewUITextItem(TXT_PXO_CLOSE, UICOL_HOTSPOT_HI);
auto close_off_text = DLLCreateNewUITextItem(TXT_PXO_CLOSE, UICOL_HOTSPOT_LO);
auto motd_text = DLLCreateNewUITextItem("PXO Message of the day", UICOL_WINDOW_TITLE);
main_wnd = DLLNewUIGameWindowCreate(0, 0, MOTD_WIDTH, MOTD_HEIGHT, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLELARGE);
void *console_item = DLLUIConsoleGadgetCreate(main_wnd, 15, 20, 30, 0, 40, 20, 0);
void *title = DLLTextCreate(main_wnd, motd_text, 0, 7, UIF_CENTER);
auto console_item = DLLUIConsoleGadgetCreate(main_wnd, 15, 20, 30, 0, 40, 20, 0);
auto title = DLLTextCreate(main_wnd, motd_text, 0, 7, UIF_CENTER);
close_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, close_off_text, close_on_text, 60, MOTD_HEIGHT - 60, 60, 20,
UIF_CENTER);
auto close_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, close_off_text, close_on_text, 60, MOTD_HEIGHT - 60, 60, 20,
UIF_CENTER);
DLLDatabaseRead("LastMOTD", szlastmotd, &motdlen);

View File

@ -231,14 +231,14 @@ bool (*DLLApplyDamageToPlayer)(object *playerobj, object *killer, int damage_typ
int server_says, int weapon_id, bool playsound);
int (*DLLMultiMatchGeneric)(uint32_t unique_id);
void (*DLLSetUITextItemText)(void *uit, char *newtext, uint32_t color);
void *(*DLLNewUIWindowCreate)(int x, int y, int w, int h, int flags);
UIObject *(*DLLNewUIWindowCreate)(int x, int y, int w, int h, int flags);
void (*DLLNewUIWindowDestroy)(void *deswin);
void (*DLLNewUIWindowOpen)(void *deswin);
void (*DLLNewUIWindowClose)(void *deswin);
void *(*DLLTextCreate)(void *parentwin, void *textitem, int x, int y, int flags);
void *(*DLLEditCreate)(void *parentwin, int id, int x, int y, int w, int h, int flags);
void *(*DLLButtonCreate)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags);
void *(*DLLListCreate)(void *parentwin, int id, int x, int y, int w, int h, int flags);
UIObject *(*DLLTextCreate)(void *parentwin, void *textitem, int x, int y, int flags);
UIObject *(*DLLEditCreate)(void *parentwin, int id, int x, int y, int w, int h, int flags);
UIObject *(*DLLButtonCreate)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags);
UIObject *(*DLLListCreate)(void *parentwin, int id, int x, int y, int w, int h, int flags);
void (*DLLListRemoveAll)(void *item);
void (*DLLListAddItem)(void *item, void *uitext);
void (*DLLListRemoveItem)(void *item, void *txtitem);
@ -252,27 +252,26 @@ int (*DLLDoUI)(void);
int (*DLLDoMessageBox)(const char *title, const char *msg, int type, ddgr_color title_color,
ddgr_color text_color);
void (*DLLDescentDefer)(void);
void *(*DLLNewUIGameWindowCreate)(int x, int y, int w, int h, int flags);
UIObject *(*DLLNewUIGameWindowCreate)(int x, int y, int w, int h, int flags);
void (*DLLNewUIGameWindowDestroy)(void *item);
void (*DLLNewUIGameWindowOpen)(void *item);
void (*DLLNewUIGameWindowClose)(void *item);
void *(*DLLHotSpotCreate)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon, int x,
int y, int w, int h, int flags);
UIObject *(*DLLHotSpotCreate)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon, int x,
int y, int w, int h, int flags);
int (*DLLPollUI)(void);
void (*DLLRemoveUITextItem)(void *item);
void *(*DLLCreateNewUITextItem)(const char *newtext, uint32_t color, int font);
UIItem *(*DLLCreateNewUITextItem)(const char *newtext, uint32_t color, int font);
void (*DLLRemoveUIBmpItem)(void *item);
void *(*DLLCreateNewUIBmpItem)(int handle, uint8_t alpha);
void *(*DLLUIConsoleGadgetCreate)(void *parentid, int id, int x, int y, int font, int cols, int rows,
int flags);
UIItem *(*DLLCreateNewUIBmpItem)(int handle, uint8_t alpha);
UIObject *(*DLLUIConsoleGadgetCreate)(void *parentid, int id, int x, int y, int font, int cols, int rows, int flags);
void (*DLLUIConsoleGadgetputs)(void *item, const char *str);
void (*DLLNewUIWindowSetFocusOnEditGadget)(void *item, void *parent);
void *(*DLLOldListCreate)(void *parentitem, int id, int x, int y, int w, int h, int flags);
UIObject *(*DLLOldListCreate)(void *parentitem, int id, int x, int y, int w, int h, int flags);
void (*DLLOldListRemoveAll)(void *item);
void (*DLLOldListAddItem)(void *item, void *uitext);
void (*DLLOldListRemoveItem)(void *item, void *txtitem);
void (*DLLOldListSelectItem)(void *item, void *txtitem);
void *(*DLLOldEditCreate)(void *parentitem, int id, int x, int y, int w, int h, int flags);
UIObject *(*DLLOldEditCreate)(void *parentitem, int id, int x, int y, int w, int h, int flags);
void (*DLLOldEditGetText)(void *item, char *buff, int len);
void (*DLLOldEditSetText)(void *item, const char *newtext);
char *(*DLLOldListGetItem)(void *item, int index);
@ -280,7 +279,7 @@ int (*DLLOldListGetSelectedIndex)(void *item);
void (*DLLToggleUICallback)(int state);
void (*DLLSetOldEditBufferLen)(void *item, int len);
void (*DLLNewUIWindowLoadBackgroundImage)(void *item, const char *image_name);
void (*DLLDeleteUIItem)(void *delitem);
void (*DLLDeleteUIItem)(UIObject *);
void (*DLLHotSpotSetStates)(void *hs, void *texton, void *textoff);
void (*DLLSetUICallback)(void (*fn)());
void (*DLLGetUICallback)(void **fn);
@ -304,7 +303,7 @@ bool (*DLLAttachObject)(object *parent, char parent_ap, object *child, char chil
bool (*DLLObjGet)(int handle, object **obj);
int (*DLLGetUIItemWidth)(void *item);
int (*DLLGetUIItemHeight)(void *item);
void *(*DLLSliderCreate)(void *parent, int id, int x, int y, int flags);
UIObject *(*DLLSliderCreate)(void *parent, int id, int x, int y, int flags);
void (*DLLSliderSetRange)(void *slider, int range);
int (*DLLSliderGetRange)(void *slider);
void (*DLLSliderSetPos)(void *slider, int pos);
@ -320,7 +319,7 @@ void (*DLLMultiSetLogoState)(bool state);
void (*DLLPlayerSpewInventory)(object *obj, bool spew_energy_and_shield, bool spew_nonspewable);
int (*DLLPlayerGetRandomStartPosition)(int slot);
void (*DLLInitPlayerNewShip)(int slot, int inven_reset);
void *(*DLLCheckBoxCreate)(void *parent, int id, void *title, int x, int y, int w, int h, int flags);
UIObject *(*DLLCheckBoxCreate)(void *parent, int id, void *title, int x, int y, int w, int h, int flags);
void (*DLLCheckBoxSetCheck)(void *cb, bool state);
bool (*DLLCheckBoxIsChecked)(void *cb);
uint32_t (*DLLnw_GetHostAddressFromNumbers)(char *str);

View File

@ -122,8 +122,8 @@
extern DMFCBase *basethis;
struct tTeamPlacementDialogInfo {
void *lb[DLLMAX_TEAMS];
void *text[DLLMAX_PLAYERS];
UIObject *lb[DLLMAX_TEAMS];
UIItem *text[DLLMAX_PLAYERS];
int trans[DLLMAX_TEAMS][DLLMAX_PLAYERS];
void (*old_callback)();
};
@ -297,10 +297,10 @@ void DMFCBase::DoDMFCUITeamPlacement(bool clients_wait, bool called_by_level_sta
}
bool exit_menu = false;
void *list_red = NULL, *list_blue = NULL, *list_green = NULL, *list_yellow = NULL;
void *icon_b_hs[DLLMAX_TEAMS][DLLMAX_TEAMS - 1];
void *icon_hs[DLLMAX_TEAMS][DLLMAX_TEAMS - 1];
void *team_text[DLLMAX_TEAMS];
UIObject *list_red = NULL, *list_blue = NULL, *list_green = NULL, *list_yellow = NULL;
UIItem *icon_b_hs[DLLMAX_TEAMS][DLLMAX_TEAMS - 1];
UIObject *icon_hs[DLLMAX_TEAMS][DLLMAX_TEAMS - 1];
UIObject *team_text[DLLMAX_TEAMS];
int count;
int id_list[DLLMAX_TEAMS * (DLLMAX_TEAMS - 1)];
@ -340,26 +340,26 @@ void DMFCBase::DoDMFCUITeamPlacement(bool clients_wait, bool called_by_level_sta
//////////////////////////////////////////////////
// Text Items
void *start_game_text_off =
auto start_game_text_off =
DLLCreateNewUITextItem((called_by_level_start) ? DTXT_UI_STARTGAME : DTXT_UI_RETURNTOGAME, UICOL_HOTSPOT_LO, -1);
void *start_game_text_on =
auto start_game_text_on =
DLLCreateNewUITextItem((called_by_level_start) ? DTXT_UI_STARTGAME : DTXT_UI_RETURNTOGAME, UICOL_HOTSPOT_HI, -1);
void *client_wait_txt = DLLCreateNewUITextItem(DTXT_UI_CLIENTSWAIT, UICOL_HOTSPOT_LO, -1);
void *window_title = DLLCreateNewUITextItem(DTXT_UI_TEAMSETUP, UICOL_WINDOW_TITLE, -1);
auto client_wait_txt = DLLCreateNewUITextItem(DTXT_UI_CLIENTSWAIT, UICOL_HOTSPOT_LO, -1);
auto window_title = DLLCreateNewUITextItem(DTXT_UI_TEAMSETUP, UICOL_WINDOW_TITLE, -1);
///////////////////////////////////////////////////
// Main Window
void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 512, 384, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 512, 384, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
///////////////////////////////////////////////////
// Item placement
int cury;
count = GetNumTeams();
void *start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40,
auto start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40,
384 - OKCANCEL_YOFFSET, 130, 15, UIF_CENTER);
void *window_title_text = DLLTextCreate(main_wnd, window_title, 0, 7, UIF_CENTER | UIF_FIT);
void *client_wait_cb;
auto window_title_text = DLLTextCreate(main_wnd, window_title, 0, 7, UIF_CENTER | UIF_FIT);
UIObject *client_wait_cb;
if (count > 2) {
client_wait_cb = DLLCheckBoxCreate(main_wnd, 128, client_wait_txt, 256 - (DLLGetUIItemWidth(client_wait_txt) / 2),
@ -709,8 +709,8 @@ void DMFCBase::DoDMFCUITeamPlacement(bool clients_wait, bool called_by_level_sta
struct tWaitForPlayers {
float last_update;
void (*old_callback)(void);
void *listbox;
void *text[DLLMAX_PLAYERS];
UIObject *listbox;
UIItem *text[DLLMAX_PLAYERS];
int indexmap[DLLMAX_PLAYERS];
};
tWaitForPlayers wfpi;
@ -782,28 +782,28 @@ void DMFCBase::DoDMFCUIWaitForPlayers(bool clients_wait) {
///////////////////////////////////////////////////
// Text Items
void *start_game_text_off = DLLCreateNewUITextItem(DTXT_UI_STARTGAME, UICOL_HOTSPOT_LO, -1);
void *start_game_text_on = DLLCreateNewUITextItem(DTXT_UI_STARTGAME, UICOL_HOTSPOT_HI, -1);
void *client_wait_txt = DLLCreateNewUITextItem(DTXT_UI_CLIENTSWAIT, UICOL_HOTSPOT_LO, -1);
void *window_title = DLLCreateNewUITextItem(DTXT_UI_WAITFORPLAYERS, UICOL_WINDOW_TITLE, -1);
void *kick_text_off = DLLCreateNewUITextItem(DTXT_UI_KICKPLAYER, UICOL_HOTSPOT_LO, -1);
void *kick_text_on = DLLCreateNewUITextItem(DTXT_UI_KICKPLAYER, UICOL_HOTSPOT_HI, -1);
void *ban_text_off = DLLCreateNewUITextItem(DTXT_UI_BANPLAYER, UICOL_HOTSPOT_LO, -1);
void *ban_text_on = DLLCreateNewUITextItem(DTXT_UI_BANPLAYER, UICOL_HOTSPOT_HI, -1);
auto start_game_text_off = DLLCreateNewUITextItem(DTXT_UI_STARTGAME, UICOL_HOTSPOT_LO, -1);
auto start_game_text_on = DLLCreateNewUITextItem(DTXT_UI_STARTGAME, UICOL_HOTSPOT_HI, -1);
auto client_wait_txt = DLLCreateNewUITextItem(DTXT_UI_CLIENTSWAIT, UICOL_HOTSPOT_LO, -1);
auto window_title = DLLCreateNewUITextItem(DTXT_UI_WAITFORPLAYERS, UICOL_WINDOW_TITLE, -1);
auto kick_text_off = DLLCreateNewUITextItem(DTXT_UI_KICKPLAYER, UICOL_HOTSPOT_LO, -1);
auto kick_text_on = DLLCreateNewUITextItem(DTXT_UI_KICKPLAYER, UICOL_HOTSPOT_HI, -1);
auto ban_text_off = DLLCreateNewUITextItem(DTXT_UI_BANPLAYER, UICOL_HOTSPOT_LO, -1);
auto ban_text_on = DLLCreateNewUITextItem(DTXT_UI_BANPLAYER, UICOL_HOTSPOT_HI, -1);
///////////////////////////////////////////////////
// Main Window
void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 512, 384, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 512, 384, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
///////////////////////////////////////////////////
// Item placement
int cury = 30;
bool exit_menu = false;
void *start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40,
auto start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40,
384 - OKCANCEL_YOFFSET, 130, 15, UIF_CENTER);
void *window_title_text = DLLTextCreate(main_wnd, window_title, 0, 7, UIF_CENTER | UIF_FIT);
void *client_wait_cb =
auto window_title_text = DLLTextCreate(main_wnd, window_title, 0, 7, UIF_CENTER | UIF_FIT);
auto client_wait_cb =
DLLCheckBoxCreate(main_wnd, 128, client_wait_txt, 30, 369 - OKCANCEL_YOFFSET, 130, 15, UIF_FIT | UIF_CENTER);
wfpi.listbox = DLLListCreate(main_wnd, -1, 40, cury, 256, 288, UIF_CENTER);
DLLCheckBoxSetCheck(client_wait_cb, clients_wait);
@ -812,9 +812,9 @@ void DMFCBase::DoDMFCUIWaitForPlayers(bool clients_wait) {
DLLGetUIItemPosition(wfpi.listbox, &l_x, &l_y, &l_w, &l_h);
l_x = l_x + l_w + 10;
l_y = (l_y + (l_h / 2)) - 15;
void *kick_hs = DLLHotSpotCreate(main_wnd, 10, -1, kick_text_off, kick_text_on, l_x, l_y, 130, 15, UIF_FIT);
auto kick_hs = DLLHotSpotCreate(main_wnd, 10, -1, kick_text_off, kick_text_on, l_x, l_y, 130, 15, UIF_FIT);
l_y += 15;
void *ban_hs = DLLHotSpotCreate(main_wnd, 20, -1, ban_text_off, ban_text_on, l_x, l_y, 130, 15, UIF_FIT);
auto ban_hs = DLLHotSpotCreate(main_wnd, 20, -1, ban_text_off, ban_text_on, l_x, l_y, 130, 15, UIF_FIT);
//////////////////////////////////////////////////
// Process all

View File

@ -132,16 +132,16 @@ void DoServerConfigureDialog(void) {
char tempbuffer[20];
bool exit_menu = false;
void *start_game_text_off = DLLCreateNewUITextItem(TXT_STARTGAME, GR_WHITE, -1);
void *start_game_text_on = DLLCreateNewUITextItem(TXT_STARTGAME, GR_RED, -1);
void *virus_pk_text = DLLCreateNewUITextItem(TXT_VIRUSCREDIT, GR_WHITE, -1);
auto start_game_text_off = DLLCreateNewUITextItem(TXT_STARTGAME, GR_WHITE, -1);
auto start_game_text_on = DLLCreateNewUITextItem(TXT_STARTGAME, GR_RED, -1);
auto virus_pk_text = DLLCreateNewUITextItem(TXT_VIRUSCREDIT, GR_WHITE, -1);
void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER);
auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER);
int cury = 20;
void *virus_pk_edit = DLLEditCreate(main_wnd, 13, 40, cury, 80, 15, 0);
auto virus_pk_edit = DLLEditCreate(main_wnd, 13, 40, cury, 80, 15, 0);
cury += 35;
void *start_game_hs =
auto start_game_hs =
DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40, cury, 130, 15, 0);
cury += 20;

View File

@ -93,31 +93,31 @@ void DisplayHoardConfigDialog(tGameConfig *config) {
// text items
// ----------
void *start_game_text_off = DLLCreateNewUITextItem(TXT_RETURNTOGAME, UICOL_HOTSPOT_LO, -1);
void *start_game_text_on = DLLCreateNewUITextItem(TXT_RETURNTOGAME, UICOL_HOTSPOT_HI, -1);
void *window_title = DLLCreateNewUITextItem(TXT_GAMECONFIG, UICOL_WINDOW_TITLE, -1);
void *min_count_label_ti = DLLCreateNewUITextItem(TXT_MINIMUMORBS, UICOL_TEXT_NORMAL, -1);
void *slider_val_ti = DLLCreateNewUITextItem(buffer, UICOL_TEXT_NORMAL, -1);
auto start_game_text_off = DLLCreateNewUITextItem(TXT_RETURNTOGAME, UICOL_HOTSPOT_LO, -1);
auto start_game_text_on = DLLCreateNewUITextItem(TXT_RETURNTOGAME, UICOL_HOTSPOT_HI, -1);
auto window_title = DLLCreateNewUITextItem(TXT_GAMECONFIG, UICOL_WINDOW_TITLE, -1);
auto min_count_label_ti = DLLCreateNewUITextItem(TXT_MINIMUMORBS, UICOL_TEXT_NORMAL, -1);
auto slider_val_ti = DLLCreateNewUITextItem(buffer, UICOL_TEXT_NORMAL, -1);
// main window
// -----------
void *main_wnd = DLLNewUIGameWindowCreate(0, 0, WINDOW_W, WINDOW_H, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
auto main_wnd = DLLNewUIGameWindowCreate(0, 0, WINDOW_W, WINDOW_H, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED);
// item placement
// --------------
int cury = 35;
int left_x_col = 20;
void *start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40,
auto start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40,
WINDOW_H - OKCANCEL_YOFFSET, 130, 15, UIF_CENTER);
void *window_title_text = DLLTextCreate(main_wnd, window_title, 0, 7, UIF_CENTER | UIF_FIT);
void *min_count_label = DLLTextCreate(main_wnd, min_count_label_ti, left_x_col, cury, UIF_FIT | UIF_CENTER);
auto window_title_text = DLLTextCreate(main_wnd, window_title, 0, 7, UIF_CENTER | UIF_FIT);
auto min_count_label = DLLTextCreate(main_wnd, min_count_label_ti, left_x_col, cury, UIF_FIT | UIF_CENTER);
cury += 15;
void *count_slider = DLLSliderCreate(main_wnd, 31, 0, cury, UIF_CENTER | UIF_FIT);
auto count_slider = DLLSliderCreate(main_wnd, 31, 0, cury, UIF_CENTER | UIF_FIT);
cury += 30;
DLLSliderSetRange(count_slider, 11);
DLLSliderSetPos(count_slider, config->min_hoard - 1);
void *slider_val = DLLTextCreate(main_wnd, slider_val_ti, left_x_col, cury, UIF_FIT | UIF_CENTER);
auto slider_val = DLLTextCreate(main_wnd, slider_val_ti, left_x_col, cury, UIF_FIT | UIF_CENTER);
// show window
// -----------

View File

@ -142,6 +142,9 @@ struct game_api {
tOSIRISModuleInit *osiris_functions;
};
class UIItem;
class UIObject;
// Descent3 function prototypes. NOTE: These must match the real D3 prototypes.
typedef void (*GetGameAPI_fp)(game_api *);
@ -611,7 +614,7 @@ DMFCDLLOUT(MultiMatchGeneric_fp DLLMultiMatchGeneric;)
typedef void (*SetUITextItemText_fp)(void *uit, char *newtext, uint32_t color);
DMFCDLLOUT(SetUITextItemText_fp DLLSetUITextItemText;)
typedef void *(*NewUIWindowCreate_fp)(int x, int y, int w, int h, int flags);
typedef UIObject *(*NewUIWindowCreate_fp)(int x, int y, int w, int h, int flags);
DMFCDLLOUT(NewUIWindowCreate_fp DLLNewUIWindowCreate;)
typedef void (*NewUIWindowDestroy_fp)(void *deswin);
@ -623,19 +626,19 @@ DMFCDLLOUT(NewUIWindowOpen_fp DLLNewUIWindowOpen;)
typedef void (*NewUIWindowClose_fp)(void *deswin);
DMFCDLLOUT(NewUIWindowClose_fp DLLNewUIWindowClose;)
typedef void *(*TextCreate_fp)(void *parentwin, void *textitem, int x, int y, int flags);
typedef UIObject *(*TextCreate_fp)(void *parentwin, void *textitem, int x, int y, int flags);
DMFCDLLOUT(TextCreate_fp DLLTextCreate;)
typedef void (*TextSetTitle_fp)(void *text, void *textitem);
DMFCDLLOUT(TextSetTitle_fp DLLTextSetTitle;)
typedef void *(*EditCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags);
typedef UIObject *(*EditCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags);
DMFCDLLOUT(EditCreate_fp DLLEditCreate;)
typedef void *(*ButtonCreate_fp)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags);
typedef UIObject *(*ButtonCreate_fp)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags);
DMFCDLLOUT(ButtonCreate_fp DLLButtonCreate;)
typedef void *(*ListCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags);
typedef UIObject *(*ListCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags);
DMFCDLLOUT(ListCreate_fp DLLListCreate;)
typedef void (*ListRemoveAll_fp)(void *item);
@ -672,7 +675,7 @@ typedef int (*GetUIItemHeight_fp)(void *item);
DMFCDLLOUT(GetUIItemHeight_fp DLLGetUIItemHeight;)
// UI CheckBox functions
typedef void *(*CheckBoxCreate_fp)(void *parent, int id, void *title, int x, int y, int w, int h, int flags);
typedef UIObject *(*CheckBoxCreate_fp)(void *parent, int id, void *title, int x, int y, int w, int h, int flags);
DMFCDLLOUT(CheckBoxCreate_fp DLLCheckBoxCreate;)
typedef void (*CheckBoxSetCheck_fp)(void *cb, bool state);
@ -695,8 +698,7 @@ DMFCDLLOUT(DoMessageBox_fp DLLDoMessageBox;)
typedef void (*DescentDefer_fp)(void);
DMFCDLLOUT(DescentDefer_fp DLLDescentDefer;)
// typedef void *(*NewUIGameWindowCreate_fp)(int x, int y, int w, int h, int flags=UIF_PROCESS_ALL);
typedef void *(*NewUIGameWindowCreate_fp)(int x, int y, int w, int h, int flags);
typedef UIObject *(*NewUIGameWindowCreate_fp)(int x, int y, int w, int h, int flags);
DMFCDLLOUT(NewUIGameWindowCreate_fp DLLNewUIGameWindowCreate;)
typedef void (*NewUIGameWindowDestroy_fp)(void *item);
@ -708,8 +710,8 @@ DMFCDLLOUT(NewUIGameWindowOpen_fp DLLNewUIGameWindowOpen;)
typedef void (*NewUIGameWindowClose_fp)(void *item);
DMFCDLLOUT(NewUIGameWindowClose_fp DLLNewUIGameWindowClose;)
typedef void *(*HotSpotCreate_fp)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon, int x, int y,
int w, int h, int flags);
typedef UIObject *(*HotSpotCreate_fp)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon,
int x, int y, int w, int h, int flags);
DMFCDLLOUT(HotSpotCreate_fp DLLHotSpotCreate;)
typedef int (*PollUI_fp)(void);
@ -718,18 +720,17 @@ DMFCDLLOUT(PollUI_fp DLLPollUI;)
typedef void (*RemoveUITextItem_fp)(void *item);
DMFCDLLOUT(RemoveUITextItem_fp DLLRemoveUITextItem;)
// typedef void *(*CreateNewUITextItem_fp)(const char *newtext,uint32_t color,int font=-1);
typedef void *(*CreateNewUITextItem_fp)(const char *newtext, uint32_t color, int font);
typedef UIItem *(*CreateNewUITextItem_fp)(const char *newtext, uint32_t color, int font);
DMFCDLLOUT(CreateNewUITextItem_fp DLLCreateNewUITextItem;)
typedef void (*RemoveUIBmpItem_fp)(void *item);
DMFCDLLOUT(RemoveUIBmpItem_fp DLLRemoveUIBmpItem;)
typedef void *(*CreateNewUIBmpItem_fp)(int handle, uint8_t alpha);
typedef UIItem *(*CreateNewUIBmpItem_fp)(int handle, uint8_t alpha);
DMFCDLLOUT(CreateNewUIBmpItem_fp DLLCreateNewUIBmpItem;)
typedef void *(*UIConsoleGadgetCreate_fp)(void *parentid, int id, int x, int y, int font, int cols, int rows,
int flags);
typedef UIObject *(*UIConsoleGadgetCreate_fp)(void *parentid, int id, int x, int y, int font,
int cols, int rows, int flags);
DMFCDLLOUT(UIConsoleGadgetCreate_fp DLLUIConsoleGadgetCreate;)
typedef void (*UIConsoleGadgetputs_fp)(void *item, const char *str);
@ -738,7 +739,7 @@ DMFCDLLOUT(UIConsoleGadgetputs_fp DLLUIConsoleGadgetputs;)
typedef void (*NewUIWindowSetFocusOnEditGadget_fp)(void *item, void *parent);
DMFCDLLOUT(NewUIWindowSetFocusOnEditGadget_fp DLLNewUIWindowSetFocusOnEditGadget;)
typedef void *(*OldListCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags);
typedef UIObject *(*OldListCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags);
DMFCDLLOUT(OldListCreate_fp DLLOldListCreate;)
typedef void (*OldListRemoveAll_fp)(void *item);
@ -753,7 +754,7 @@ DMFCDLLOUT(OldListRemoveItem_fp DLLOldListRemoveItem;)
typedef void (*OldListSelectItem_fp)(void *item, void *txtitem);
DMFCDLLOUT(OldListSelectItem_fp DLLOldListSelectItem;)
typedef void *(*OldEditCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags);
typedef UIObject *(*OldEditCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags);
DMFCDLLOUT(OldEditCreate_fp DLLOldEditCreate;)
typedef void (*OldEditGetText_fp)(void *item, char *buff, int len);
@ -777,7 +778,7 @@ DMFCDLLOUT(SetOldEditBufferLen_fp DLLSetOldEditBufferLen;)
typedef void (*NewUIWindowLoadBackgroundImage_fp)(void *item, const char *image_name);
DMFCDLLOUT(NewUIWindowLoadBackgroundImage_fp DLLNewUIWindowLoadBackgroundImage;)
typedef void (*DeleteUIItem_fp)(void *delitem);
typedef void (*DeleteUIItem_fp)(UIObject *);
DMFCDLLOUT(DeleteUIItem_fp DLLDeleteUIItem;)
typedef void (*HotSpotSetStates_fp)(void *hs, void *texton, void *textoff);
@ -805,8 +806,7 @@ DMFCDLLOUT(ui_HideCursor_fp DLLHideCursor;)
typedef void (*GameFrame_fp)(void);
DMFCDLLOUT(GameFrame_fp DLLGameFrame;)
// typedef void *(*SliderCreate_fp)(void *parent, int id, int x, int y, int flags=0);
typedef void *(*SliderCreate_fp)(void *parent, int id, int x, int y, int flags);
typedef UIObject *(*SliderCreate_fp)(void *parent, int id, int x, int y, int flags);
DMFCDLLOUT(SliderCreate_fp DLLSliderCreate;)
typedef void (*SliderSetRange_fp)(void *slider, int range);