mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-26 02:19:21 +01:00
Add mode to have one-line Equipment display, fix customization not changing in Designs.
This commit is contained in:
parent
656c8ed564
commit
51bfcd1136
7 changed files with 304 additions and 167 deletions
|
|
@ -109,23 +109,23 @@ public partial class CustomizationDrawer
|
|||
var tmp = _currentByte != CustomizeValue.Zero;
|
||||
if (_withApply)
|
||||
{
|
||||
switch (UiHelpers.DrawMetaToggle(_currentOption, string.Empty, tmp, _currentApply, out var newValue, out var newApply, _locked))
|
||||
switch (UiHelpers.DrawMetaToggle(_currentIndex.ToDefaultName(), string.Empty, tmp, _currentApply, out var newValue, out var newApply, _locked))
|
||||
{
|
||||
case DataChange.Item:
|
||||
ChangeApply = newApply ? ChangeApply | _currentFlag : ChangeApply & ~_currentFlag;
|
||||
_customize.Set(idx, tmp ? CustomizeValue.Max : CustomizeValue.Zero);
|
||||
_customize.Set(idx, newValue ? CustomizeValue.Max : CustomizeValue.Zero);
|
||||
Changed |= _currentFlag;
|
||||
break;
|
||||
case DataChange.ApplyItem:
|
||||
ChangeApply = newApply ? ChangeApply | _currentFlag : ChangeApply & ~_currentFlag;
|
||||
break;
|
||||
case DataChange.Item | DataChange.ApplyItem:
|
||||
_customize.Set(idx, tmp ? CustomizeValue.Max : CustomizeValue.Zero);
|
||||
_customize.Set(idx, newValue ? CustomizeValue.Max : CustomizeValue.Zero);
|
||||
Changed |= _currentFlag;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (ImGui.Checkbox(_currentOption, ref tmp))
|
||||
else if (ImGui.Checkbox(_currentIndex.ToDefaultName(), ref tmp))
|
||||
{
|
||||
_customize.Set(idx, tmp ? CustomizeValue.Max : CustomizeValue.Zero);
|
||||
Changed |= _currentFlag;
|
||||
|
|
@ -144,4 +144,11 @@ public partial class CustomizationDrawer
|
|||
if (UiHelpers.DrawCheckbox("##apply", $"Apply the {_currentOption} customization in this design.", _currentApply, out _, _locked))
|
||||
ToggleApply();
|
||||
}
|
||||
|
||||
// Update the current Apply value.
|
||||
private void ToggleApply()
|
||||
{
|
||||
_currentApply = !_currentApply;
|
||||
ChangeApply = _currentApply ? ChangeApply | _currentFlag : ChangeApply & ~_currentFlag;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue