本文整理汇总了C++中uiimport_t::SG_GameAllowedToSaveHere方法的典型用法代码示例。如果您正苦于以下问题:C++ uiimport_t::SG_GameAllowedToSaveHere方法的具体用法?C++ uiimport_t::SG_GameAllowedToSaveHere怎么用?C++ uiimport_t::SG_GameAllowedToSaveHere使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类uiimport_t
的用法示例。
在下文中一共展示了uiimport_t::SG_GameAllowedToSaveHere方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UI_SetActiveMenu
/*
=================
UI_SetActiveMenu -
this should be the ONLY way the menu system is brought up
=================
*/
void UI_SetActiveMenu( const char* menuname,const char *menuID )
{
// this should be the ONLY way the menu system is brought up (besides the UI_ConsoleCommand below)
if (cls.state != CA_DISCONNECTED && !ui.SG_GameAllowedToSaveHere(qtrue)) //don't check full sytem, only if incamera
{
return;
}
if ( !menuname ) {
UI_ForceMenuOff();
return;
}
//make sure force-speed and slowmodeath doesn't slow down menus - NOTE: they should reset the timescale when the game un-pauses
Cvar_SetValue( "timescale", 1.0f );
UI_Cursor_Show(qtrue);
// enusure minumum menu data is cached
Menu_Cache();
if ( Q_stricmp (menuname, "mainMenu") == 0 )
{
UI_MainMenu();
return;
}
if ( Q_stricmp (menuname, "ingame") == 0 )
{
ui.Cvar_Set( "cl_paused", "1" );
UI_InGameMenu(menuID);
return;
}
if ( Q_stricmp (menuname, "datapad") == 0 )
{
ui.Cvar_Set( "cl_paused", "1" );
UI_DataPadMenu();
return;
}
#ifndef JK2_MODE
if ( Q_stricmp (menuname, "missionfailed_menu") == 0 )
{
Menus_CloseAll();
Menus_ActivateByName("missionfailed_menu");
ui.Key_SetCatcher( KEYCATCH_UI );
return;
}
#endif
}
示例2: UI_ConsoleCommand
qboolean UI_ConsoleCommand( void )
{
char *cmd;
if (!ui.SG_GameAllowedToSaveHere(qtrue)) //only check if incamera
{
return qfalse;
}
cmd = UI_Argv( 0 );
// ensure minimum menu data is available
Menu_Cache();
if ( Q_stricmp (cmd, "ui_cache") == 0 )
{
UI_Cache_f();
return qtrue;
}
if ( Q_stricmp (cmd, "levelselect") == 0 )
{
UI_LoadMenu_f();
return qtrue;
}
if ( Q_stricmp (cmd, "ui_teamOrders") == 0 )
{
UI_SaveMenu_f();
return qtrue;
}
if ( Q_stricmp (cmd, "ui_report") == 0 )
{
UI_Report();
return qtrue;
}
#ifndef JK2_MODE
if ( Q_stricmp (cmd, "ui_load") == 0 )
{
UI_Load();
return qtrue;
}
#endif
return qfalse;
}