MCPcopy Create free account
hub / github.com/JACoders/OpenJK / UI_MainMenu

Function UI_MainMenu

code/ui/ui_main.cpp:4165–4181  ·  view source on GitHub ↗

=============== UI_MainMenu The main menu only comes up when not in a game, so make sure that the attract loop server is down and that local cinematics are killed =============== */

Source from the content-addressed store, hash-verified

4163===============
4164*/
4165void UI_MainMenu(void)
4166{
4167 char buf[256];
4168 ui.Cvar_Set("sv_killserver", "1"); // let the demo server know it should shut down
4169
4170 ui.Key_SetCatcher( KEYCATCH_UI );
4171
4172 menuDef_t *m = Menus_ActivateByName("mainMenu");
4173 if (!m)
4174 { //wha? try again
4175 UI_LoadMenus("ui/menus.txt",qfalse);
4176 }
4177 ui.Cvar_VariableStringBuffer("com_errorMessage", buf, sizeof(buf));
4178 if (strlen(buf)) {
4179 Menus_ActivateByName("error_popmenu");
4180 }
4181}
4182
4183
4184/*

Callers 1

UI_SetActiveMenuFunction · 0.85

Calls 2

Menus_ActivateByNameFunction · 0.70
UI_LoadMenusFunction · 0.70

Tested by

no test coverage detected