fix: use effective layout everywhere

This commit is contained in:
Anna 2021-03-10 14:25:39 -05:00
parent cb1faf1167
commit b8c99f1839
3 changed files with 3 additions and 5 deletions

View File

@ -106,7 +106,7 @@ namespace HUD_Manager {
return Marshal.PtrToStructure<Layout>(slotPtr); return Marshal.PtrToStructure<Layout>(slotPtr);
} }
public void WriteLayout(HudSlot slot, Layout layout) { private void WriteLayout(HudSlot slot, Layout layout) {
var slotPtr = this.GetLayoutPointer(slot); var slotPtr = this.GetLayoutPointer(slot);
var dict = layout.ToDictionary(); var dict = layout.ToDictionary();

View File

@ -78,9 +78,7 @@ namespace HUD_Manager {
return; return;
} }
var layout = entry.Value; this.Hud.WriteEffectiveLayout(this.Config.StagingSlot, entry.Key);
this.Hud.WriteLayout(this.Config.StagingSlot, layout.ToLayout());
this.Hud.SelectSlot(this.Config.StagingSlot, true); this.Hud.SelectSlot(this.Config.StagingSlot, true);
} }
} }

View File

@ -405,7 +405,7 @@ namespace HUD_Manager {
} }
if (update) { if (update) {
this.Plugin.Hud.WriteLayout(this.Plugin.Config.StagingSlot, layout.ToLayout()); this.Plugin.Hud.WriteEffectiveLayout(this.Plugin.Config.StagingSlot, this._selectedEditLayout);
this.Plugin.Hud.SelectSlot(this.Plugin.Config.StagingSlot, true); this.Plugin.Hud.SelectSlot(this.Plugin.Config.StagingSlot, true);
} }