public void OnMessageBoxCallback(MyGuiScreenMessageBox.ResultEnum callbackReturn) { if (callbackReturn == MyGuiScreenMessageBox.ResultEnum.YES) { // Save current video mode settings MyVideoSettingsManager.SaveCurrentSettings(); // These are now OLD settings ReadSettingsFromControls(ref m_settingsOld); this.CloseScreenNow(); if (m_settingsNew.NewAdapterOrdinal != m_settingsNew.AdapterOrdinal) { MyGuiSandbox.AddScreen(MyGuiSandbox.CreateMessageBox( buttonType: MyMessageBoxButtonsType.YES_NO, messageCaption: MyTexts.Get(MyCommonTexts.MessageBoxCaptionWarning), messageText: MyTexts.Get(MyCommonTexts.MessageBoxTextRestartNeededAfterAdapterSwitch), callback: OnMessageBoxAdapterChangeCallback)); } } else { m_doRevert = true; } m_waitingForConfirmation = false; }
internal void SetToMediumQuality() { MyPerformanceSettings settings3 = new MyPerformanceSettings(); MyRenderSettings1 settings4 = new MyRenderSettings1 { AnisotropicFiltering = MyTextureAnisoFiltering.NONE, AntialiasingMode = MyAntialiasingMode.FXAA, ShadowQuality = MyShadowsQuality.MEDIUM, AmbientOcclusionEnabled = true, TextureQuality = MyTextureQuality.MEDIUM, ModelQuality = MyRenderQualityEnum.NORMAL, VoxelQuality = MyRenderQualityEnum.NORMAL, GrassDrawDistance = 160f, GrassDensityFactor = 1f, HqDepth = true, VoxelShaderQuality = MyRenderQualityEnum.NORMAL, AlphaMaskedShaderQuality = MyRenderQualityEnum.NORMAL, AtmosphereShaderQuality = MyRenderQualityEnum.NORMAL, DistanceFade = 100f }; settings3.RenderSettings = settings4; settings3.EnableDamageEffects = true; MyGraphicsSettings currentGraphicsSettings = MyVideoSettingsManager.CurrentGraphicsSettings; currentGraphicsSettings.PerformanceSettings = settings3; MyVideoSettingsManager.Apply(currentGraphicsSettings); MyVideoSettingsManager.SaveCurrentSettings(); }
public void OnOkClick(MyGuiControlButton sender) { // Update NEW settings if (ReadSettingsFromControls(ref m_settingsNew)) { MyGuiSandbox.AddScreen(MyGuiSandbox.CreateMessageBox( buttonType: MyMessageBoxButtonsType.OK, messageText: MyTexts.Get(MySpaceTexts.MessageBoxTextRestartNeededAfterRendererSwitch), messageCaption: MyTexts.Get(MyCommonTexts.MessageBoxCaptionWarning))); } MyVideoSettingsManager.Apply(m_settingsNew); MyVideoSettingsManager.SaveCurrentSettings(); CloseScreen(); }
public void OnMessageBoxCallback(MyGuiScreenMessageBox.ResultEnum callbackReturn) { if (callbackReturn == MyGuiScreenMessageBox.ResultEnum.YES) { // Save current video mode settings MyVideoSettingsManager.SaveCurrentSettings(); // These are now OLD settings ReadSettingsFromControls(ref m_settingsOld); this.CloseScreenNow(); } else { m_doRevert = true; } m_waitingForConfirmation = false; }
public static string ChangeFOV(List <string> arg) { if (arg.Count < 1) { return("not enough arguments!"); } float fovSetting; if (float.TryParse(arg[0], out fovSetting)) { var currentsettings = MyVideoSettingsManager.CurrentGraphicsSettings; currentsettings.FieldOfView = MathHelper.ToRadians(fovSetting); MyVideoSettingsManager.Apply(currentsettings); MyVideoSettingsManager.SaveCurrentSettings(); return($"Set FOV to: {fovSetting}"); } return("Invalid input!"); }
public void OnCancelClick(MyGuiControlButton sender) { MyVideoSettingsManager.Apply(m_settingsOld); MyVideoSettingsManager.SaveCurrentSettings(); CloseScreen(); }