Add cutscene borders switch to the menu

This commit is contained in:
Sergeanur
2020-07-11 12:03:56 +03:00
parent 00bba630f6
commit 6eb8f6ae5a
6 changed files with 44 additions and 3 deletions

View File

@ -132,6 +132,14 @@ void ToggleFreeCam(int8 action)
}
#endif
#ifdef CUTSCENE_BORDERS_SWITCH
void BorderModeChange(int8 displayedValue)
{
CMenuManager::m_PrefsCutsceneBorders = !!displayedValue;
FrontEndMenuManager.SaveSettings();
}
#endif
// Reloaded on language change, so you can use hardcoded wchar* and TheText.Get with peace of mind
void
CustomFrontendOptionsPopulate(void)
@ -161,6 +169,12 @@ CustomFrontendOptionsPopulate(void)
FrontendOptionSetPosition(MENUPAGE_CONTROLLER_PC, 1);
FrontendOptionAddDynamic(text, nil, ToggleFreeCam, nil);
#endif
#ifdef CUTSCENE_BORDERS_SWITCH
static const wchar *off_on[] = { TheText.Get("FEM_OFF"), TheText.Get("FEM_ON") };
FrontendOptionSetPosition(MENUPAGE_GRAPHICS_SETTINGS, 9);
FrontendOptionAddSelect((const wchar *)L"CUTSCENE BORDERS", off_on, 2, (int8 *)&CMenuManager::m_PrefsCutsceneBorders, false, BorderModeChange, nil);
#endif
}
#endif