Fixed Updater Settings
• Fixed changing a setting would not save to the file. • Fixed the updater file textbox looking weird.
This commit is contained in:
parent
dc1c028d5a
commit
0999d997cb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user