Main menu
| 1143 | |
| 1144 | // Main menu |
| 1145 | bool TelComMainMenu(tTelComInfo *tcs) { |
| 1146 | bool exitparse = false; |
| 1147 | int mm; |
| 1148 | |
| 1149 | mainmenu_system = -1; |
| 1150 | |
| 1151 | DestroyAllScreens(); |
| 1152 | |
| 1153 | for (mm = 0; mm < TCMAX_MMBUTTONS; mm++) { |
| 1154 | MMButtons[mm].enabled = false; |
| 1155 | MMButtons[mm].system = TS_OFF; |
| 1156 | } |
| 1157 | |
| 1158 | TCBKGDESC backg; |
| 1159 | backg.color = BACKGROUND_COLOR; |
| 1160 | backg.caps = TCBGD_COLOR; |
| 1161 | backg.type = TC_BACK_STATIC; |
| 1162 | |
| 1163 | TCBMPDESC bmpdesc; |
| 1164 | bmpdesc.type = TC_BMP_STATIC; |
| 1165 | bmpdesc.flags = 0; |
| 1166 | bmpdesc.caps = TCBD_XY; |
| 1167 | bmpdesc.x = 0; |
| 1168 | bmpdesc.y = 0; |
| 1169 | strcpy(bmpdesc.filename, "TelComMainMenu.ogf"); |
| 1170 | /* |
| 1171 | $$TABLE_GAMEFILE "TelComMainMenu.ogf" |
| 1172 | */ |
| 1173 | |
| 1174 | TCTEXTDESC textdesc; |
| 1175 | textdesc.type = TC_TEXT_STATIC; |
| 1176 | textdesc.font = BBRIEF_FONT_INDEX; |
| 1177 | textdesc.caps = TCTD_TEXTBOX | TCTD_COLOR | TCTD_FONT; |
| 1178 | textdesc.textbox.left = 65; |
| 1179 | textdesc.textbox.right = 380; |
| 1180 | textdesc.textbox.top = 2; |
| 1181 | textdesc.textbox.bottom = 50; |
| 1182 | textdesc.color = GR_RGB(255, 255, 255); |
| 1183 | |
| 1184 | TCBUTTONDESC buttdesc; |
| 1185 | strcpy(buttdesc.filename, MAINMENU_BUTTON); |
| 1186 | strcpy(buttdesc.flash_filename, MAINMENU_BUTTONGLOW); |
| 1187 | |
| 1188 | #if 0 // def DEMO |
| 1189 | // strcpy(buttdesc.filename_focus, MAINMENU_BUTTONFOCUS); |
| 1190 | // strcpy(buttdesc.flash_filename_focus, MAINMENU_BUTTONGLOWFOCUS); |
| 1191 | #else |
| 1192 | strcpy(buttdesc.filename_focus, MAINMENU_BUTTONGLOW); |
| 1193 | strcpy(buttdesc.flash_filename_focus, MAINMENU_BUTTONGLOW); |
| 1194 | #endif |
| 1195 | buttdesc.sibling_id = buttdesc.parent_id = -1; |
| 1196 | buttdesc.internal = TCMainMenuCallback; |
| 1197 | buttdesc.flash_time = 0; |
| 1198 | buttdesc.button_type = BUTT_INTERNAL; |
| 1199 | buttdesc.flasher = true; |
| 1200 | buttdesc.click_type = CLICKTYPE_CLICKUP; |
| 1201 | buttdesc.osflags = OBF_GLOW | OBF_MOUSEOVERFOCUS; |
| 1202 | buttdesc.x = 0; |
no test coverage detected