Fix FixedDesign enabled/disabled status saving.

This commit is contained in:
Ottermandias 2021-10-12 13:09:12 +02:00
parent 29a3f3104d
commit 0560648018
2 changed files with 8 additions and 4 deletions

View file

@ -5,12 +5,12 @@ namespace Glamourer
{
public class GlamourerConfig : IPluginConfiguration
{
public struct FixedDesign
public class FixedDesign
{
public string Name;
public string Path;
public string Name = string.Empty;
public string Path = string.Empty;
public uint JobGroups;
public bool Enabled;
public bool Enabled;
}
public int Version { get; set; } = 1;

View file

@ -72,7 +72,11 @@ namespace Glamourer.Gui
if (ImGui.Checkbox($"##Enabled{i}", ref tmp))
if (tmp && _plugin.FixedDesigns.EnableDesign(name)
|| !tmp && _plugin.FixedDesigns.DisableDesign(name))
{
Glamourer.Config.FixedDesigns[i].Enabled = tmp;
Glamourer.Config.Save();
}
raii.PopStyles();
raii.PopFonts();
ImGui.TableNextColumn();