MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / AddButton

Method AddButton

Descent3/newui_core.cpp:1107–1119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1105}
1106
1107void newuiMessageBox::AddButton(const char *title, int slot, int key) {
1108 ASSERT(slot >= 0 && slot < NEWUI_MSGBOX_MAXBTNS);
1109
1110 if (m_btn[slot].IsCreated()) {
1111 m_btn[slot].Destroy();
1112 }
1113
1114 m_btn[slot].Create(this, slot, title, NEWUI_MSGBOX_BUTTONS_X,
1115 NEWUI_MSGBOX_BUTTONS_Y2 + NEWUI_MSGBOX_BUTTONS_H2 * slot, NEWUI_BTNF_FRAMED);
1116 if (key) {
1117 m_btn[slot].SetHotkey(key);
1118 }
1119}
1120
1121// grab the message box's sheet.
1122newuiSheet *newuiMessageBox::GetSheet() { return &m_sheet; }

Callers 15

PilotChooseFunction · 0.80
DoPilotTauntScreenFunction · 0.80
PltSelectShipFunction · 0.80
ShowPilotPicDialogFunction · 0.80
SaveGameDialogFunction · 0.80
LoadGameDialogFunction · 0.80
MainMultiplayerMenuFunction · 0.80
DisplayNetDLLHelpFunction · 0.80
ShowNetgameInfoFunction · 0.80
weapon_select_dialogFunction · 0.80

Calls 4

IsCreatedMethod · 0.80
SetHotkeyMethod · 0.80
DestroyMethod · 0.45
CreateMethod · 0.45

Tested by

no test coverage detected