MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / SetGUI

Method SetGUI

neo/framework/Session_menu.cpp:97–121  ·  view source on GitHub ↗

================= idSessionLocal::SetGUI ================= */

Source from the content-addressed store, hash-verified

95=================
96*/
97void idSessionLocal::SetGUI( idUserInterface *gui, HandleGuiCommand_t handle ) {
98 guiActive = gui;
99 guiHandle = handle;
100 if ( guiMsgRestore ) {
101 common->DPrintf( "idSessionLocal::SetGUI: cleared an active message box\n" );
102 guiMsgRestore = NULL;
103 }
104 if ( !guiActive ) {
105 return;
106 }
107
108 if ( guiActive == guiMainMenu ) {
109 SetSaveGameGuiVars();
110 SetMainMenuGuiVars();
111 } else if ( guiActive == guiRestartMenu ) {
112 SetSaveGameGuiVars();
113 }
114
115 sysEvent_t ev;
116 memset( &ev, 0, sizeof( ev ) );
117 ev.evType = SE_NONE;
118
119 guiActive->HandleEvent( &ev, com_frameTime );
120 guiActive->Activate( true, com_frameTime );
121}
122
123/*
124===============

Calls 3

DPrintfMethod · 0.45
HandleEventMethod · 0.45
ActivateMethod · 0.45

Tested by

no test coverage detected