本文整理汇总了C++中uiimport_t::Cvar_Set方法的典型用法代码示例。如果您正苦于以下问题:C++ uiimport_t::Cvar_Set方法的具体用法?C++ uiimport_t::Cvar_Set怎么用?C++ uiimport_t::Cvar_Set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类uiimport_t
的用法示例。
在下文中一共展示了uiimport_t::Cvar_Set方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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_SetCvarInt
void UI_SetCvarInt( const char *cvar, int value )
{
char s[ 16 ];
sprintf( s, "%d", value );
uii.Cvar_Set( cvar, s );
}
示例3: UI_SetCvarFloat
void UI_SetCvarFloat( const char *cvar, float value )
{
char s[ 16 ];
sprintf( s, "%f", value );
uii.Cvar_Set( cvar, s );
}
示例4: UI_ForceMenuOff
/*
=================
UI_ForceMenuOff
=================
*/
void UI_ForceMenuOff (void)
{
ui.Key_SetCatcher( ui.Key_GetCatcher() & ~KEYCATCH_UI );
ui.Key_ClearStates();
ui.Cvar_Set( "cl_paused", "0" );
}