mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-20 23:54:28 +01:00
Add Facewear to application rules.
This commit is contained in:
parent
029cf12bed
commit
1bee5c680b
1 changed files with 45 additions and 15 deletions
|
|
@ -14,6 +14,7 @@ using ImGuiNET;
|
||||||
using OtterGui;
|
using OtterGui;
|
||||||
using OtterGui.Classes;
|
using OtterGui.Classes;
|
||||||
using OtterGui.Raii;
|
using OtterGui.Raii;
|
||||||
|
using OtterGui.Text;
|
||||||
using Penumbra.GameData.Enums;
|
using Penumbra.GameData.Enums;
|
||||||
using static Glamourer.Gui.Tabs.HeaderDrawer;
|
using static Glamourer.Gui.Tabs.HeaderDrawer;
|
||||||
|
|
||||||
|
|
@ -250,11 +251,15 @@ public class DesignPanel
|
||||||
using (var _ = ImRaii.Group())
|
using (var _ = ImRaii.Group())
|
||||||
{
|
{
|
||||||
DrawCustomizeApplication();
|
DrawCustomizeApplication();
|
||||||
ImGui.NewLine();
|
ImUtf8.IconDummy();
|
||||||
DrawCrestApplication();
|
DrawCrestApplication();
|
||||||
ImGui.NewLine();
|
ImUtf8.IconDummy();
|
||||||
if (_config.UseAdvancedParameters)
|
if (_config.UseAdvancedParameters)
|
||||||
|
{
|
||||||
DrawMetaApplication();
|
DrawMetaApplication();
|
||||||
|
ImUtf8.IconDummy();
|
||||||
|
DrawBonusSlotApplication();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.SameLine(ImGui.GetContentRegionAvail().X / 2);
|
ImGui.SameLine(ImGui.GetContentRegionAvail().X / 2);
|
||||||
|
|
@ -287,23 +292,37 @@ public class DesignPanel
|
||||||
EquipSlot.OffHand,
|
EquipSlot.OffHand,
|
||||||
});
|
});
|
||||||
|
|
||||||
ImGui.NewLine();
|
ImUtf8.IconDummy();
|
||||||
ApplyEquip("Armor", ApplicationTypeExtensions.ArmorFlags, false, EquipSlotExtensions.EquipmentSlots);
|
ApplyEquip("Armor", ApplicationTypeExtensions.ArmorFlags, false, EquipSlotExtensions.EquipmentSlots);
|
||||||
|
|
||||||
ImGui.NewLine();
|
ImUtf8.IconDummy();
|
||||||
ApplyEquip("Accessories", ApplicationTypeExtensions.AccessoryFlags, false, EquipSlotExtensions.AccessorySlots);
|
ApplyEquip("Accessories", ApplicationTypeExtensions.AccessoryFlags, false, EquipSlotExtensions.AccessorySlots);
|
||||||
|
|
||||||
ImGui.NewLine();
|
ImUtf8.IconDummy();
|
||||||
ApplyEquip("Dyes", ApplicationTypeExtensions.StainFlags, true,
|
ApplyEquip("Dyes", ApplicationTypeExtensions.StainFlags, true,
|
||||||
EquipSlotExtensions.FullSlots);
|
EquipSlotExtensions.FullSlots);
|
||||||
|
|
||||||
ImGui.NewLine();
|
ImUtf8.IconDummy();
|
||||||
if (_config.UseAdvancedParameters)
|
if (_config.UseAdvancedParameters)
|
||||||
|
{
|
||||||
DrawParameterApplication();
|
DrawParameterApplication();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
DrawMetaApplication();
|
DrawMetaApplication();
|
||||||
|
ImUtf8.IconDummy();
|
||||||
|
DrawBonusSlotApplication();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static readonly IReadOnlyList<string> MetaLabels =
|
||||||
|
[
|
||||||
|
"Apply Wetness",
|
||||||
|
"Apply Hat Visibility",
|
||||||
|
"Apply Visor State",
|
||||||
|
"Apply Weapon Visibility",
|
||||||
|
];
|
||||||
|
|
||||||
private void DrawMetaApplication()
|
private void DrawMetaApplication()
|
||||||
{
|
{
|
||||||
|
|
@ -312,15 +331,7 @@ public class DesignPanel
|
||||||
var flags = (uint)_selector.Selected!.Application.Meta;
|
var flags = (uint)_selector.Selected!.Application.Meta;
|
||||||
var bigChange = ImGui.CheckboxFlags("Apply All Meta Changes", ref flags, all);
|
var bigChange = ImGui.CheckboxFlags("Apply All Meta Changes", ref flags, all);
|
||||||
|
|
||||||
var labels = new[]
|
foreach (var (index, label) in MetaExtensions.AllRelevant.Zip(MetaLabels))
|
||||||
{
|
|
||||||
"Apply Wetness",
|
|
||||||
"Apply Hat Visibility",
|
|
||||||
"Apply Visor State",
|
|
||||||
"Apply Weapon Visibility",
|
|
||||||
};
|
|
||||||
|
|
||||||
foreach (var (index, label) in MetaExtensions.AllRelevant.Zip(labels))
|
|
||||||
{
|
{
|
||||||
var apply = bigChange ? ((MetaFlag)flags).HasFlag(index.ToFlag()) : _selector.Selected!.DoApplyMeta(index);
|
var apply = bigChange ? ((MetaFlag)flags).HasFlag(index.ToFlag()) : _selector.Selected!.DoApplyMeta(index);
|
||||||
if (ImGui.Checkbox(label, ref apply) || bigChange)
|
if (ImGui.Checkbox(label, ref apply) || bigChange)
|
||||||
|
|
@ -328,6 +339,25 @@ public class DesignPanel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static readonly IReadOnlyList<string> BonusSlotLabels =
|
||||||
|
[
|
||||||
|
"Apply Facewear",
|
||||||
|
];
|
||||||
|
|
||||||
|
private void DrawBonusSlotApplication()
|
||||||
|
{
|
||||||
|
using var id = ImUtf8.PushId("Bonus"u8);
|
||||||
|
var flags = _selector.Selected!.Application.BonusItem;
|
||||||
|
var bigChange = BonusExtensions.AllFlags.Count > 1 && ImUtf8.Checkbox("Apply All Bonus Slots"u8, ref flags, BonusExtensions.All);
|
||||||
|
foreach (var (index, label) in BonusExtensions.AllFlags.Zip(BonusSlotLabels))
|
||||||
|
{
|
||||||
|
var apply = bigChange ? flags.HasFlag(index) : _selector.Selected!.DoApplyBonusItem(index);
|
||||||
|
if (ImUtf8.Checkbox(label, ref apply) || bigChange)
|
||||||
|
_manager.ChangeApplyBonusItem(_selector.Selected!, index, apply);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void DrawParameterApplication()
|
private void DrawParameterApplication()
|
||||||
{
|
{
|
||||||
using var id = ImRaii.PushId("Parameter");
|
using var id = ImRaii.PushId("Parameter");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue