Fix application rule labels.

This commit is contained in:
Ottermandias 2024-01-17 11:58:52 +01:00
parent 0cb2933a0e
commit ee0bdace30

View file

@ -175,6 +175,7 @@ public class DesignPanel(
private void DrawCustomizeApplication() private void DrawCustomizeApplication()
{ {
using var id = ImRaii.PushId("Customizations");
var set = _selector.Selected!.CustomizeSet; var set = _selector.Selected!.CustomizeSet;
var available = set.SettingAvailable | CustomizeFlag.Clan | CustomizeFlag.Gender | CustomizeFlag.BodyType; var available = set.SettingAvailable | CustomizeFlag.Clan | CustomizeFlag.Gender | CustomizeFlag.BodyType;
var flags = _selector.Selected!.ApplyCustomizeExcludingBodyType == 0 ? 0 : var flags = _selector.Selected!.ApplyCustomizeExcludingBodyType == 0 ? 0 :
@ -207,6 +208,7 @@ public class DesignPanel(
private void DrawCrestApplication() private void DrawCrestApplication()
{ {
using var id = ImRaii.PushId("Crests");
var flags = (uint)_selector.Selected!.ApplyCrest; var flags = (uint)_selector.Selected!.ApplyCrest;
var bigChange = ImGui.CheckboxFlags("Apply All Crests", ref flags, (uint)CrestExtensions.AllRelevant); var bigChange = ImGui.CheckboxFlags("Apply All Crests", ref flags, (uint)CrestExtensions.AllRelevant);
foreach (var flag in CrestExtensions.AllRelevantSet) foreach (var flag in CrestExtensions.AllRelevantSet)
@ -239,7 +241,7 @@ public class DesignPanel(
void ApplyEquip(string label, EquipFlag allFlags, bool stain, IEnumerable<EquipSlot> slots) void ApplyEquip(string label, EquipFlag allFlags, bool stain, IEnumerable<EquipSlot> slots)
{ {
var flags = (uint)(allFlags & _selector.Selected!.ApplyEquip); var flags = (uint)(allFlags & _selector.Selected!.ApplyEquip);
using var id = ImRaii.PushId(label);
var bigChange = ImGui.CheckboxFlags($"Apply All {label}", ref flags, (uint)allFlags); var bigChange = ImGui.CheckboxFlags($"Apply All {label}", ref flags, (uint)allFlags);
if (stain) if (stain)
foreach (var slot in slots) foreach (var slot in slots)
@ -283,6 +285,7 @@ public class DesignPanel(
private void DrawMetaApplication() private void DrawMetaApplication()
{ {
using var id = ImRaii.PushId("Meta");
const uint all = 0x0Fu; const uint all = 0x0Fu;
var flags = (_selector.Selected!.DoApplyHatVisible() ? 0x01u : 0x00) var flags = (_selector.Selected!.DoApplyHatVisible() ? 0x01u : 0x00)
| (_selector.Selected!.DoApplyVisorToggle() ? 0x02u : 0x00) | (_selector.Selected!.DoApplyVisorToggle() ? 0x02u : 0x00)
@ -308,6 +311,7 @@ public class DesignPanel(
private void DrawParameterApplication() private void DrawParameterApplication()
{ {
using var id = ImRaii.PushId("Parameter");
var flags = (uint)_selector.Selected!.ApplyParameters; var flags = (uint)_selector.Selected!.ApplyParameters;
var bigChange = ImGui.CheckboxFlags("Apply All Customize Parameters", ref flags, (uint)CustomizeParameterExtensions.All); var bigChange = ImGui.CheckboxFlags("Apply All Customize Parameters", ref flags, (uint)CustomizeParameterExtensions.All);
foreach (var flag in CustomizeParameterExtensions.AllFlags) foreach (var flag in CustomizeParameterExtensions.AllFlags)