diff --git a/Config.cs b/Config.cs index f6b7e5a..4b77ffc 100644 --- a/Config.cs +++ b/Config.cs @@ -21,7 +21,7 @@ public static void RegisterConfig() MelonPrefs.RegisterBool(Category, nameof(ShowSongInfo), true, "Display song info during gameplay."); MelonPrefs.RegisterBool(Category, nameof(ShowHighscoreDifference), true, "Display score difference from your highscore"); - MelonPrefs.RegisterFloat(Category, nameof(OverlayScale), 1.4f, "Changes the scale of the overlay"); + MelonPrefs.RegisterFloat(Category, nameof(OverlayScale), 1.4f, "Changes the scale of the overlay [0,5,0.2,1.4]"); OnModSettingsApplied(); } diff --git a/Main.cs b/Main.cs index 293910c..4b69563 100644 --- a/Main.cs +++ b/Main.cs @@ -28,6 +28,7 @@ public override void OnLevelWasInitialized(int level) public override void OnModSettingsApplied() { Config.OnModSettingsApplied(); + UI.OnModSettingsApplied(); } public override void OnUpdate() diff --git a/UI.cs b/UI.cs index 66a39fc..502bea3 100644 --- a/UI.cs +++ b/UI.cs @@ -51,12 +51,12 @@ public static void Initialize() { PrepareOverlay(); GetReferences(); - canvasScaler.scaleFactor = Config.OverlayScale; FadeOutOverlay(); overlay.SetActive(false); bottomRight.gameObject.SetActive(false); topLeft.gameObject.SetActive(Config.ShowModifiers); kataConfig = KataConfig.I; + OnModSettingsApplied(); } public static void PrepareOverlay() @@ -132,6 +132,13 @@ public static void UpdateUiInfo(SongList.SongData data) ModifierText.text = Utility.GetModText(); } + public static void OnModSettingsApplied() + { + canvasScaler.scaleFactor = Config.OverlayScale; + topRight.gameObject.SetActive(Config.ShowSongInfo); + topLeft.gameObject.SetActive(Config.ShowModifiers); + bottomLeft.gameObject.SetActive(Config.ShowScore); + } public static void UpdateDisplay(int score, int streak)