diff --git a/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs b/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs index 7411ea2..9076a69 100644 --- a/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs +++ b/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs @@ -387,6 +387,8 @@ public class DesignPanel ImGui.SameLine(); DrawApplyToTarget(); ImGui.SameLine(); + _modAssociations.DrawApplyButton(); + ImGui.SameLine(); DrawSaveToDat(); } diff --git a/Glamourer/Gui/Tabs/DesignTab/ModAssociationsTab.cs b/Glamourer/Gui/Tabs/DesignTab/ModAssociationsTab.cs index c09b73d..cb7df3a 100644 --- a/Glamourer/Gui/Tabs/DesignTab/ModAssociationsTab.cs +++ b/Glamourer/Gui/Tabs/DesignTab/ModAssociationsTab.cs @@ -43,10 +43,22 @@ public class ModAssociationsTab private void DrawApplyAllButton() { var current = _penumbra.CurrentCollection; - if (!ImGuiUtil.DrawDisabledButton($"Try Applying All Associated Mods to {current}##applyAll", + if (ImGuiUtil.DrawDisabledButton($"Try Applying All Associated Mods to {current}##applyAll", new Vector2(ImGui.GetContentRegionAvail().X, 0), string.Empty, current is "")) - return; + ApplyAll(); + } + public void DrawApplyButton() + { + var current = _penumbra.CurrentCollection; + if (ImGuiUtil.DrawDisabledButton("Apply Mod Associations", Vector2.Zero, + $"Try to apply all associated mod settings to Penumbras current collection {current}", + _selector.Selected!.AssociatedMods.Count == 0 || current is "")) + ApplyAll(); + } + + public void ApplyAll() + { foreach (var (mod, settings) in _selector.Selected!.AssociatedMods) _penumbra.SetMod(mod, settings); }