mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-22 07:27:44 +01:00
Add using game base state as base for fixed design sets.
This commit is contained in:
parent
8f9beed6f8
commit
c909510edc
11 changed files with 69 additions and 18 deletions
|
|
@ -344,7 +344,7 @@ public class ActorPanel
|
|||
{
|
||||
if (ImGuiUtil.DrawDisabledButton("Revert to Game", Vector2.Zero, "Revert the character to its actual state in the game.",
|
||||
_state!.IsLocked))
|
||||
_stateManager.ResetState(_state!);
|
||||
_stateManager.ResetState(_state!, StateChanged.Source.Manual);
|
||||
|
||||
ImGui.SameLine();
|
||||
if (ImGuiUtil.DrawDisabledButton("Reapply State", Vector2.Zero, "Try to reapply the configured state if something went wrong.",
|
||||
|
|
|
|||
|
|
@ -73,8 +73,17 @@ public class SetPanel
|
|||
if (!child || !_selector.HasSelection)
|
||||
return;
|
||||
|
||||
var enabled = Selection.Enabled;
|
||||
if (ImGui.Checkbox("Enabled", ref enabled))
|
||||
_manager.SetState(_selector.SelectionIndex, enabled);
|
||||
|
||||
var useGame = _selector.Selection!.BaseState is AutoDesignSet.Base.Game;
|
||||
if (ImGui.Checkbox("Use Game State as Base", ref useGame))
|
||||
_manager.ChangeBaseState(_selector.SelectionIndex, useGame ? AutoDesignSet.Base.Game : AutoDesignSet.Base.Current);
|
||||
|
||||
var name = _tempName ?? Selection.Name;
|
||||
var flags = _selector.IncognitoMode ? ImGuiInputTextFlags.ReadOnly | ImGuiInputTextFlags.Password : ImGuiInputTextFlags.None;
|
||||
ImGui.SetNextItemWidth(220 * ImGuiHelpers.GlobalScale);
|
||||
if (ImGui.InputText("##Name", ref name, 128, flags))
|
||||
_tempName = name;
|
||||
|
||||
|
|
@ -84,11 +93,6 @@ public class SetPanel
|
|||
_tempName = null;
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
var enabled = Selection.Enabled;
|
||||
if (ImGui.Checkbox("Enabled", ref enabled))
|
||||
_manager.SetState(_selector.SelectionIndex, enabled);
|
||||
|
||||
ImGui.Separator();
|
||||
DrawIdentifierSelection(_selector.SelectionIndex);
|
||||
|
||||
|
|
|
|||
|
|
@ -1083,7 +1083,7 @@ public unsafe class DebugTab : ITab
|
|||
ImGuiUtil.DrawTableColumn(state.Identifier.ToString());
|
||||
ImGui.TableNextColumn();
|
||||
if (ImGui.Button("Reset"))
|
||||
_state.ResetState(state);
|
||||
_state.ResetState(state, StateChanged.Source.Manual);
|
||||
|
||||
ImGui.TableNextRow();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue