5 namespace Loot.UI.Common.Core
10 internal abstract class VisibilityUI :
UIState 14 public virtual void ToggleUI(UserInterface theInterface,
UIState uiStateInstance = null)
16 uiStateInstance = uiStateInstance ??
this;
19 if (theInterface.CurrentState is VisibilityUI ui
20 && theInterface.CurrentState != uiStateInstance)
22 ui.ToggleUI(theInterface, ui);
27 theInterface.ResetLasts();
28 theInterface.SetState(Visible ? uiStateInstance : null);
30 Main.PlaySound(SoundID.MenuOpen);