mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-22 15:37:44 +01:00
Allow restricting only the options forcing redraw in customize drawer and do this for screen actors.
This commit is contained in:
parent
506f4b887e
commit
27281bedfb
7 changed files with 63 additions and 30 deletions
|
|
@ -55,18 +55,23 @@ public static class UiHelpers
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static DataChange DrawMetaToggle(string label, string tooltip, bool currentValue, bool currentApply, out bool newValue, out bool newApply,
|
||||
public static DataChange DrawMetaToggle(string label, string tooltip, bool currentValue, bool currentApply, out bool newValue,
|
||||
out bool newApply,
|
||||
bool locked)
|
||||
{
|
||||
var flags = currentApply ? currentValue ? 3 : 0 : 2;
|
||||
bool ret;
|
||||
var flags = currentApply ? currentValue ? 3 : 0 : 2;
|
||||
bool ret;
|
||||
using var style = ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, ImGui.GetStyle().ItemInnerSpacing);
|
||||
using (var disabled = ImRaii.Disabled(locked))
|
||||
{
|
||||
ret = ImGui.CheckboxFlags(label, ref flags, 3);
|
||||
ret = ImGui.CheckboxFlags("##" + label, ref flags, 3);
|
||||
}
|
||||
|
||||
ImGuiUtil.HoverTooltip(tooltip);
|
||||
|
||||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted(label);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
(newValue, newApply, var change) = (currentValue, currentApply) switch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue