mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-15 21:24:18 +01:00
Fix revert to automation.
This commit is contained in:
parent
fdd74c0514
commit
7af0a1d562
3 changed files with 8 additions and 14 deletions
|
|
@ -223,6 +223,7 @@ public sealed class AutoDesignApplier : IDisposable
|
|||
if (!GetPlayerSet(identifier, out var set))
|
||||
return;
|
||||
|
||||
_state.ResetState(state, StateSource.Game);
|
||||
Reduce(actor, state, set, false, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,25 +4,19 @@ using OtterGui.Widgets;
|
|||
|
||||
namespace Glamourer.Gui.Tabs.AutomationTab;
|
||||
|
||||
public class AutomationTab : ITab
|
||||
public class AutomationTab(SetSelector selector, SetPanel panel, Configuration config) : ITab
|
||||
{
|
||||
private readonly SetSelector _selector;
|
||||
private readonly SetPanel _panel;
|
||||
|
||||
public AutomationTab(SetSelector selector, SetPanel panel)
|
||||
{
|
||||
_selector = selector;
|
||||
_panel = panel;
|
||||
}
|
||||
|
||||
public ReadOnlySpan<byte> Label
|
||||
=> "Automation"u8;
|
||||
|
||||
public bool IsVisible
|
||||
=> config.EnableAutoDesigns;
|
||||
|
||||
public void DrawContent()
|
||||
{
|
||||
_selector.Draw(GetSetSelectorSize());
|
||||
selector.Draw(GetSetSelectorSize());
|
||||
ImGui.SameLine();
|
||||
_panel.Draw();
|
||||
panel.Draw();
|
||||
}
|
||||
|
||||
public float GetSetSelectorSize()
|
||||
|
|
|
|||
|
|
@ -223,8 +223,7 @@ public class InternalStateEditor(
|
|||
|
||||
/// <summary> Change the value of a single material color table entry. </summary>
|
||||
public bool ChangeMaterialValue(ActorState state, MaterialValueIndex index, in MaterialValueState newValue, StateSource source,
|
||||
out ColorRow? oldValue,
|
||||
uint key = 0)
|
||||
out ColorRow? oldValue, uint key = 0)
|
||||
{
|
||||
// We already have an existing value.
|
||||
if (state.Materials.TryGetValue(index, out var old))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue