3 protected const int COMBO_OPTION_QUALITY = 0;
4 protected const int COMBO_OPTION_PERFORMANCE = 1;
6 protected EPlatform m_ePlatform;
10 override void OnTabCreate(Widget menuRoot, ResourceName buttonsLayout,
int index)
12 super.OnTabCreate(menuRoot, buttonsLayout,
index);
20 if (!m_SettingsVideoModule)
21 Print(
"VideoSettingsConsoleSubMenu: Video settings manager module not found!", LogLevel.WARNING);
23 m_ePlatform = System.GetPlatform();
30 if (m_ePlatform != EPlatform.XBOX_SERIES_X && m_ePlatform != EPlatform.XBOX_SERIES_S)
33 ChangePreset(m_ePlatform, itemIndex);
37 protected void ChangePreset(EPlatform platform,
int itemIndex)
39 if (!m_SettingsVideoModule)
42 if (platform == EPlatform.XBOX_SERIES_S && itemIndex == COMBO_OPTION_QUALITY)
43 m_SettingsVideoModule.SetConsolePreset(EVideoQualityPreset.SERIES_S_PRESET_QUALITY);
45 if (platform == EPlatform.XBOX_SERIES_S && itemIndex == COMBO_OPTION_PERFORMANCE)
46 m_SettingsVideoModule.SetConsolePreset(EVideoQualityPreset.SERIES_S_PRESET_PERFORMANCE);
48 if (platform == EPlatform.XBOX_SERIES_X && itemIndex == COMBO_OPTION_QUALITY)
49 m_SettingsVideoModule.SetConsolePreset(EVideoQualityPreset.SERIES_X_PRESET_QUALITY);
51 if (platform == EPlatform.XBOX_SERIES_X && itemIndex == COMBO_OPTION_PERFORMANCE)
52 m_SettingsVideoModule.SetConsolePreset(EVideoQualityPreset.SERIES_X_PRESET_PERFORMANCE);
57 protected void SetupQualityPreset()
65 BaseContainer videoSettings =
GetGame().GetGameUserSettings().GetModule(
"SCR_VideoSettings");
69 videoSettings.Get(
"m_iLastUsedPreset", lastPreset);
71 if (lastPreset == EVideoQualityPreset.SERIES_X_PRESET_QUALITY || lastPreset == EVideoQualityPreset.SERIES_S_PRESET_QUALITY)
72 qualityPreset.SetCurrentItem(COMBO_OPTION_QUALITY);
74 if (lastPreset == EVideoQualityPreset.SERIES_X_PRESET_PERFORMANCE || lastPreset == EVideoQualityPreset.SERIES_S_PRESET_PERFORMANCE)
75 qualityPreset.SetCurrentItem(COMBO_OPTION_PERFORMANCE);
77 qualityPreset.m_OnChanged.Insert(OnQualityPresetChanged);