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

Function UI_ConsoleCommand

code/ui/ui_atoms.cpp:202–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200#endif
201
202qboolean UI_ConsoleCommand( void )
203{
204 char *cmd;
205
206 if (!ui.SG_GameAllowedToSaveHere(qtrue)) //only check if incamera
207 {
208 return qfalse;
209 }
210
211 cmd = UI_Argv( 0 );
212
213 // ensure minimum menu data is available
214 Menu_Cache();
215
216 if ( Q_stricmp (cmd, "ui_cache") == 0 )
217 {
218 UI_Cache_f();
219 return qtrue;
220 }
221
222 if ( Q_stricmp (cmd, "levelselect") == 0 )
223 {
224 UI_LoadMenu_f();
225 return qtrue;
226 }
227
228 if ( Q_stricmp (cmd, "ui_teamOrders") == 0 )
229 {
230 UI_SaveMenu_f();
231 return qtrue;
232 }
233
234 if ( Q_stricmp (cmd, "ui_report") == 0 )
235 {
236 UI_Report();
237 return qtrue;
238 }
239
240#ifndef JK2_MODE
241 if ( Q_stricmp (cmd, "ui_load") == 0 )
242 {
243 UI_Load();
244 return qtrue;
245 }
246#endif
247
248 return qfalse;
249}
250
251
252/*

Callers 1

UI_GameCommandFunction · 0.50

Calls 8

Menu_CacheFunction · 0.85
Q_stricmpFunction · 0.85
UI_LoadMenu_fFunction · 0.85
UI_SaveMenu_fFunction · 0.85
UI_ArgvFunction · 0.70
UI_Cache_fFunction · 0.70
UI_ReportFunction · 0.70
UI_LoadFunction · 0.70

Tested by

no test coverage detected