From 0999d997cb07e047e9d3d032059cf8f67717fe2c Mon Sep 17 00:00:00 2001 From: JacobTech Date: Thu, 11 Apr 2024 20:31:55 -0400 Subject: [PATCH] Fixed Updater Settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Fixed changing a setting would not save to the file. • Fixed the updater file textbox looking weird. --- Luski/GUI/MainScreen/UI/SettingsMenu.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Luski/GUI/MainScreen/UI/SettingsMenu.cs b/Luski/GUI/MainScreen/UI/SettingsMenu.cs index 23e7057..438e155 100644 --- a/Luski/GUI/MainScreen/UI/SettingsMenu.cs +++ b/Luski/GUI/MainScreen/UI/SettingsMenu.cs @@ -298,8 +298,6 @@ public class SettingsMenu : UserControl }); - - TextBox t; page!.Controls.Add(t =new TextBox() { @@ -344,7 +342,7 @@ public class SettingsMenu : UserControl { var e = Enum.Parse(PropType, (v - va).ToString()); PropVal = e; - prop.SetValue(Globals.Settings, e); + prop.SetValue(Globals.UpdaterSettings, e); } Globals.UpdaterSettings.SaveSettings(Path.Combine(Globals.LuskiPath, "UpdaterSettings.json"), UpdaterSettingsContext.Default.UpdaterSettings); }); @@ -364,7 +362,7 @@ public class SettingsMenu : UserControl string description = ((DescriptionAttribute)valueAttributes[0]).Description; AddBool(description, (bool)PropVal, b => { - prop.SetValue(Globals.Settings, b); + prop.SetValue(Globals.UpdaterSettings, b); Globals.UpdaterSettings.SaveSettings(Path.Combine(Globals.LuskiPath, "UpdaterSettings.json"), UpdaterSettingsContext.Default.UpdaterSettings); }); } @@ -373,6 +371,7 @@ public class SettingsMenu : UserControl // ignored } } + } t.ForceDistanceUpdate(page); @@ -382,7 +381,8 @@ public class SettingsMenu : UserControl Globals.UpdaterSettings.SaveSettings(Path.Combine(Globals.LuskiPath, "UpdaterSettings.json"), UpdaterSettingsContext.Default.UpdaterSettings); return Task.CompletedTask; }; - Globals.ms.ForceUpdate(new(Globals.ms.ClientSize)); + TryDraw(); + Globals.ms.ForceUpdate(new(Globals.ms.CS)); } }; As.AddButton(cb);