From 2beb47597b2f17ecef4c498add554df8fa61b26e Mon Sep 17 00:00:00 2001 From: dvaer Date: Sat, 17 Aug 2024 00:25:46 +0300 Subject: [PATCH] HotFix --- ZoFo/GameCore/GUI/OptionsGUI.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ZoFo/GameCore/GUI/OptionsGUI.cs b/ZoFo/GameCore/GUI/OptionsGUI.cs index 975fc43..5bcf0a3 100644 --- a/ZoFo/GameCore/GUI/OptionsGUI.cs +++ b/ZoFo/GameCore/GUI/OptionsGUI.cs @@ -39,6 +39,7 @@ public class OptionsGUI : AbstractGUI var slider_OverallVolume = new Slider(Manager) { rectangle = new Rectangle(width / 2, height / 3, width / 10, height / 20), indentation = 7, textureName = "Textures\\GUI\\Switch_backgrownd", MinValue = 0, MaxValue = 1 }; + slider_OverallVolume.SetValue(AppManager.Instance.SettingsManager.MainVolume); slider_OverallVolume.SliderChanged += (newVal) => { label_OverallVolume_Percent.text = Math.Round(slider_OverallVolume.GetSliderValue * 100) + "%"; @@ -57,6 +58,7 @@ public class OptionsGUI : AbstractGUI var slider_MusicVolume = new Slider(Manager) { rectangle = new Rectangle(width / 2, height / 3 + (height / 20 + height / 40) * 1, width / 10, height / 20), indentation = 7, textureName = "Textures\\GUI\\Switch_backgrownd", MinValue = 0, MaxValue = 1 }; + slider_MusicVolume.SetValue(AppManager.Instance.SettingsManager.MusicVolume); slider_MusicVolume.SliderChanged += (newVal) => { label_MusicVolume_Percent.text = Math.Round(slider_MusicVolume.GetSliderValue * 100) + "%"; @@ -75,6 +77,7 @@ public class OptionsGUI : AbstractGUI var slider_EffectsVolume = new Slider(Manager) { rectangle = new Rectangle(width / 2, height / 3 + (height / 20 + height / 40) * 2, width / 10, height / 20), indentation = 7, textureName = "Textures\\GUI\\Switch_backgrownd", MinValue = 0, MaxValue = 1 }; + slider_EffectsVolume.SetValue(AppManager.Instance.SettingsManager.SoundEffectsVolume); slider_EffectsVolume.SliderChanged += (newVal) => { label_EffectsVolume_Percent.text = Math.Round(slider_EffectsVolume.GetSliderValue * 100) + "%";