本文整理汇总了C++中CGameSettings::GetFloatVar方法的典型用法代码示例。如果您正苦于以下问题:C++ CGameSettings::GetFloatVar方法的具体用法?C++ CGameSettings::GetFloatVar怎么用?C++ CGameSettings::GetFloatVar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGameSettings
的用法示例。
在下文中一共展示了CGameSettings::GetFloatVar方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnFocus
// Called when the folder gains or focus
void CFolderDisplay::OnFocus(LTBOOL bFocus)
{
CGameSettings *pSettings = g_pInterfaceMgr->GetSettings();
if (bFocus)
{
m_bEscape = LTFALSE;
m_bHardwareCursor = (GetConsoleInt("HardwareCursor",0) > 0 && GetConsoleInt("DisableHardwareCursor",0) == 0);
m_pHardwareCursor->Enable(GetConsoleInt("DisableHardwareCursor",0) == 0);
// The current render mode
RMode currentMode;
g_pLTClient->GetRenderMode(¤tMode);
// Set the renderer controls so that they match the currently selected renderer
unsigned int n;
for (n=0; n < m_rendererArray.GetSize(); n++)
{
unsigned int i;
for (i=0; i < m_rendererArray[n].m_resolutionArray.GetSize(); i++)
{
RMode mode=GetRendererModeStruct(n, i);
if (IsRendererEqual(¤tMode, &mode))
{
// Set the renderer index
m_pRendererCtrl->SetSelIndex(n);
// Setup the resolution control
SetupResolutionCtrl();
// Set the resolution index
m_pResolutionCtrl->SetSelIndex(i);
}
}
}
m_bTexture32 = pSettings->GetBoolVar("32BitTextures");
UpdateData(LTFALSE);
SetSelection(1);
}
else
{
UpdateData();
if (m_bEscape)
{
LTBOOL bTexture32 = pSettings->GetBoolVar("32BitTextures");
WriteConsoleInt("HardwareCursor",(int)m_bHardwareCursor);
pSettings->SetBoolVar("32BitTextures",m_bTexture32);
LTBOOL bRebind = (bTexture32 != m_bTexture32);
// Set the render mode if we are losing focus
if (m_pRendererCtrl && m_pResolutionCtrl)
{
int oldMO = (int)pSettings->GetFloatVar("MipmapOffset");
LTBOOL bSet = SetRenderer(m_pRendererCtrl->GetSelIndex(), m_pResolutionCtrl->GetSelIndex());
// If we didn't switch resolutions and the mipmap offset changed, rebind textures.
if(!bSet)
{
int curMO = (int)pSettings->GetFloatVar("MipmapOffset");
if(curMO != oldMO)
{
bRebind = LTTRUE;
}
}
}
if (bRebind)
{
g_pLTClient->Start3D();
g_pLTClient->StartOptimized2D();
g_pInterfaceResMgr->DrawMessage(GetSmallFont(),IDS_REBINDING_TEXTURES);
g_pLTClient->EndOptimized2D();
g_pLTClient->End3D();
g_pLTClient->FlipScreen(0);
g_pLTClient->RunConsoleString("RebindTextures");
}
}
if (GetConsoleInt("BitDepth",16) == 16)
WriteConsoleInt("DrawPortals",0);
else if ((GetConsoleInt("BitDepth",16) == 32) && (GetConsoleInt("PerformanceLevel",1) == 2))
WriteConsoleInt("DrawPortals",1);
//.........这里部分代码省略.........