本文整理汇总了C++中CGameSettings::IsGoreAllowed方法的典型用法代码示例。如果您正苦于以下问题:C++ CGameSettings::IsGoreAllowed方法的具体用法?C++ CGameSettings::IsGoreAllowed怎么用?C++ CGameSettings::IsGoreAllowed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGameSettings
的用法示例。
在下文中一共展示了CGameSettings::IsGoreAllowed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Build
// Build the folder
LTBOOL CFolderGame::Build()
{
CreateTitle(IDS_TITLE_GAME_OPTIONS);
CGameSettings* pSettings = g_pInterfaceMgr->GetSettings();
if (g_pLayoutMgr->HasCustomValue(FOLDER_ID_GAME,"ColumnWidth"))
kGap = g_pLayoutMgr->GetFolderCustomInt(FOLDER_ID_GAME,"ColumnWidth");
if (g_pLayoutMgr->HasCustomValue(FOLDER_ID_GAME,"SliderWidth"))
kWidth = g_pLayoutMgr->GetFolderCustomInt(FOLDER_ID_GAME,"SliderWidth");
//crosshair menu
AddTextItem(IDS_CONTROLS_CROSSHAIR, FOLDER_CMD_CROSSHAIR, IDS_HELP_CROSSHAIRMENU);
CCycleCtrl *pCycle = AddCycleItem(IDS_DISPLAY_SUBTITLES,IDS_HELP_SUBTITLES,kGap-25,25,&m_nSubtitles);
pCycle->AddString(IDS_OFF);
pCycle->AddString(IDS_ON);
if (pSettings && pSettings->IsGoreAllowed())
{
CToggleCtrl *pGore = AddToggle(IDS_DISPLAY_GORE,IDS_HELP_GORE,kGap,&m_bGore);
pGore->SetOnString(IDS_ON);
pGore->SetOffString(IDS_OFF);
}
CToggleCtrl *pFadeBodies = AddToggle(IDS_FADEBODIES,IDS_HELP_FADEBODIES,kGap,&m_bFadeBodies);
pFadeBodies->SetOnString(IDS_YES);
pFadeBodies->SetOffString(IDS_NO);
//always run
CToggleCtrl* pToggle = AddToggle(IDS_ADVCONTROLS_RUNLOCK, IDS_HELP_RUNLOCK, kGap, &m_bAlwaysRun );
pToggle->SetOnString(IDS_YES);
pToggle->SetOffString(IDS_NO);
// Add the Difficulty option
m_pDifficultyCtrl = AddCycleItem(IDS_DIFFICULTY,IDS_HELP_DIFFICULTY,kGap-25,25,&m_nDifficulty);
m_pDifficultyCtrl->AddString(IDS_NEW_EASY);
m_pDifficultyCtrl->AddString(IDS_NEW_MEDIUM);
m_pDifficultyCtrl->AddString(IDS_NEW_HARD);
m_pDifficultyCtrl->AddString(IDS_NEW_INSANE);
pCycle = AddCycleItem(IDS_HUDLAYOUT,IDS_HELP_HUDLAYOUT,kGap-25,25,&m_nLayout);
for (int hl = 0; hl < g_pLayoutMgr->GetNumHUDLayouts(); hl++)
{
pCycle->AddString(g_pLayoutMgr->GetLayoutName(hl));
}
CSliderCtrl *pSlider=AddSlider(IDS_HEADBOB, IDS_HELP_HEADBOB, kGap, kWidth, &m_nHeadBob);
pSlider->SetSliderRange(0, 10);
pSlider->SetSliderIncrement(1);
pSlider=AddSlider(IDS_WEAPONSWAY, IDS_HELP_WEAPONSWAY, kGap, kWidth, &m_nWeaponSway);
pSlider->SetSliderRange(0, 10);
pSlider->SetSliderIncrement(1);
pSlider=AddSlider(IDS_PICKUP_MSG_DUR, IDS_HELP_PICKUP_MSG_DUR, kGap, kWidth, &m_nPickupMsgDur);
pSlider->SetSliderRange(0, 10);
pSlider->SetSliderIncrement(1);
pToggle = AddToggle(IDS_OBJECTIVE_MSGS, IDS_HELP_OBJECTIVE_MSGS, kGap, &m_bObjMessages );
pToggle->SetOnString(IDS_YES);
pToggle->SetOffString(IDS_NO);
// Make sure to call the base class
if (! CBaseFolder::Build()) return LTFALSE;
UseBack(LTTRUE,LTTRUE);
return LTTRUE;
}