本文整理汇总了C++中CVar::getInt方法的典型用法代码示例。如果您正苦于以下问题:C++ CVar::getInt方法的具体用法?C++ CVar::getInt怎么用?C++ CVar::getInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CVar
的用法示例。
在下文中一共展示了CVar::getInt方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NET_Poll
void NET_Poll(void)
{
PollProcedure *pp;
bool useModem;
if (!configRestored)
{
if (serialAvailable)
{
if (config_com_modem.getInt() == 1.0)
useModem = true;
else
useModem = false;
SetComPortConfig (0, config_com_port.getInt(), config_com_irq.getInt(), config_com_baud.getInt(), useModem);
SetModemConfig (0, config_modem_dialtype.getString(), config_modem_clear.getString(), config_modem_init.getString(), config_modem_hangup.getString());
}
configRestored = true;
}
SetNetTime();
for (pp = pollProcedureList; pp; pp = pp->next)
{
if (pp->nextTime > net_time)
break;
pollProcedureList = pp->next;
pp->procedure();//(pp->arg);
}
}
示例2: guiDelegate
MainApp::MainApp()
{
Bind(wxEVT_CLOSE_WINDOW, &MainApp::onClose, this);
m_wxLoginForm = nullptr;
m_wxTBIcon = nullptr;
m_wxMainForm = nullptr;
m_bQuiteMode = false;
m_bLoggedIn = false;
m_iMode = MODE_LOGOUT;
//need to overide the value in corecount if not set
if (gc_corecount.getInt() == 0)
{
//need to change the value so it will trigger the cvar callback
gc_corecount.setValue(1);
gc_corecount.setValue(0);
}
m_pOfflineDialog = nullptr;
m_pInternalLink = nullptr;
#ifdef WITH_GTEST
m_UnitTestForm = nullptr;
#endif
onLoginAcceptedEvent += guiDelegate(this, &MainApp::onLoginAcceptedCB);
onInternalLinkEvent += guiDelegate(this, &MainApp::onInternalLink);
onInternalLinkStrEvent += guiDelegate(this, &MainApp::onInternalStrLink);
onNotifyGiftUpdateEvent += guiDelegate(this, &MainApp::onNotifyGiftUpdate);
}
示例3: CL_SignonReply
/**
* An svc_signonnum has been received, perform a client side setup
*/
void CL_SignonReply(void) {
char str[8192];
Con_DPrintf("CL_SignonReply: %i\n", cls.signon);
switch (cls.signon) {
case 1:
MSG_WriteByte(&cls.message, clc_stringcmd);
MSG_WriteString(&cls.message, "prespawn");
break;
case 2:
MSG_WriteByte(&cls.message, clc_stringcmd);
MSG_WriteString(&cls.message, va("name \"%s\"\n", cl_name.getString()));
MSG_WriteByte(&cls.message, clc_stringcmd);
MSG_WriteString(&cls.message, va("color %i %i\n", cl_color.getInt() >> 4, cl_color.getInt()&15));
MSG_WriteByte(&cls.message, clc_stringcmd);
sprintf(str, "spawn %s", cls.spawnparms);
MSG_WriteString(&cls.message, str);
break;
case 3:
MSG_WriteByte(&cls.message, clc_stringcmd);
MSG_WriteString(&cls.message, "begin");
MemoryObj::Report(); // print remaining memory
break;
case 4:
SCR_EndLoadingPlaque(); // allow normal screen updates
break;
}
}
示例4: SCR_SizeDown_f
void SCR_SizeDown_f(void) {
//JHL:HACK; changed to affect the HUD, not SCR size
if (hud.getInt() > 0) {
hud.set(hud.getFloat() - 1);
vid.recalc_refdef = 1;
}
//qmb :hud
//Cvar_SetValue ("viewsize",scr_viewsize.value-10);
//vid.recalc_refdef = 1;
}
示例5: guiDelegate
MainApp::MainApp()
{
Bind(wxEVT_CLOSE_WINDOW, &MainApp::onClose, this);
//need to override the value in core count if not set
if (gc_corecount.getInt() == 0)
{
//need to change the value so it will trigger the cvar callback
gc_corecount.setValue(1);
gc_corecount.setValue(0);
}
onLoginAcceptedEvent += guiDelegate(this, &MainApp::onLoginAcceptedCB);
onInternalLinkEvent += guiDelegate(this, &MainApp::onInternalLink);
onInternalLinkStrEvent += guiDelegate(this, &MainApp::onInternalStrLink);
onNotifyGiftUpdateEvent += guiDelegate(this, &MainApp::onNotifyGiftUpdate);
onLoggedOutEvent += guiDelegate(this, &MainApp::onLoggedOut);
}
示例6: Host_FilterTime
/**
* Returns false if the time is too short to run a frame
*/
bool Host_FilterTime(float time) {
realtime += time;
if (max_fps.getInt() > 0) {
// CAPTURE <[email protected]>
if (!cls.capturedemo) // only allow the following early return if not capturing:
if (!cls.timedemo && realtime - oldrealtime < 1.0 / max_fps.getFloat())
return false; // framerate is too high
}
host_frametime = realtime - oldrealtime;
oldrealtime = realtime;
if (host_framerate.getFloat() > 0)
host_frametime = host_framerate.getFloat();
else { // don't allow really long or short frames
if (host_frametime > 0.1)
host_frametime = 0.1;
if (host_frametime < 0.001)
host_frametime = 0.001;
}
return true;
}
示例7: strStagingUrl
//.........这里部分代码省略.........
wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer( 1, 3, 0, 0 );
fgSizer1->AddGrowableCol( 0 );
fgSizer1->AddGrowableCol( 2 );
fgSizer1->AddGrowableRow( 0 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer1->Add( fgSizer2, 1, wxEXPAND, 5 );
fgSizer1->Add( 0, 15, 1, wxEXPAND|wxBOTTOM, 15 );
this->SetSizer( fgSizer1 );
this->Layout();
m_bSavePos = false;
m_vTabOrder.push_back(m_tbUsername);
m_vTabOrder.push_back(m_tbPasswordDisp);
m_vTabOrder.push_back(m_tbPassword);
m_vTabOrder.push_back( m_cbRemPass );
#ifdef WIN32
m_vTabOrder.push_back( m_cbProxyOff );
#endif
m_vTabOrder.push_back( m_cbBypassSSLRevocationCheck );
m_vTabOrder.push_back(m_butSignin);
m_vTabOrder.push_back(m_butCancel);
m_vTabOrder.push_back(m_linkOffline);
m_vTabOrder.push_back(m_linkNewAccount);
m_vTabOrder.push_back(m_linkLostPassword);
Centre(wxCENTRE_ON_SCREEN);
SetFocus();
if (gc_login_x.getInt() == -1 || gc_login_y.getInt() == -1)
{
int x = wxSystemSettings::GetMetric(wxSYS_SCREEN_X);
int y = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y);
int w=0;
int h=0;
GetSize(&w, &h);
int newX = (x-w)/2;
int newY = (y-h)/2;
if (newX>0 && newY>0)
SetSize(newX, newY, -1, -1);
}
else
{
#ifdef NIX
if (! gc_allow_wm_positioning.getBool())
#endif
setSavedWindowPos(gc_login_x.getInt(), gc_login_y.getInt(), UINT_MAX, UINT_MAX);
}
if (gc_savelogin.getBool())
m_cbRemPass->SetValue(true);
#ifdef WIN32
bool isProxyOff = gc_saveProxyOff.getBool();
UTIL::OS::setProxyOff( isProxyOff );
m_cbProxyOff->SetValue( isProxyOff );
#endif
bool isBypassSSLRevocationCheck = gc_saveBypassSSLRevocationCheck.getBool();
示例8: gcFrame
//.........这里部分代码省略.........
wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer( 1, 3, 0, 0 );
fgSizer1->AddGrowableCol( 0 );
fgSizer1->AddGrowableCol( 2 );
fgSizer1->AddGrowableRow( 0 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer1->Add( fgSizer2, 1, wxEXPAND, 5 );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
this->SetSizer( fgSizer1 );
this->Layout();
m_bSavePos = false;
m_vTabOrder.push_back(m_tbUsername);
m_vTabOrder.push_back(m_tbPasswordDisp);
m_vTabOrder.push_back(m_tbPassword);
#ifndef UI_HIDE_AUTOLOGIN
m_vTabOrder.push_back(m_cbRemPass);
#endif
m_vTabOrder.push_back(m_butSignin);
m_vTabOrder.push_back(m_butCancel);
m_vTabOrder.push_back(m_linkOffline);
m_vTabOrder.push_back(m_linkNewAccount);
m_vTabOrder.push_back(m_linkLostPassword);
Centre(wxCENTRE_ON_SCREEN);
SetFocus();
if (gc_login_x.getInt() == -1 || gc_login_y.getInt() == -1)
{
int x = wxSystemSettings::GetMetric(wxSYS_SCREEN_X);
int y = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y);
int w=0;
int h=0;
GetSize(&w, &h);
int newX = (x-w)/2;
int newY = (y-h)/2;
if (newX>0 && newY>0)
SetSize(newX, newY, -1, -1);
}
else
{
#ifdef NIX
if (! gc_allow_wm_positioning.getBool())
#endif
setSavedWindowPos(gc_login_x.getInt(), gc_login_y.getInt(), UINT_MAX, UINT_MAX);
}
#ifndef UI_HIDE_AUTOLOGIN
if (gc_savelogin.getBool())
m_cbRemPass->SetValue(true);
#endif
if (gc_saveusername.getBool())
{
const char* str = gc_lastusername.getString();
const char* avatar = gc_lastavatar.getString();