| 1105 | } |
| 1106 | |
| 1107 | void 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. |
| 1122 | newuiSheet *newuiMessageBox::GetSheet() { return &m_sheet; } |
no test coverage detected