/// <summary> /// Hide the menu /// </summary> public void Hide() { if (!IsShown) { return; } IsShown = false; ContextObject = null; OnHide.SafeInvoke(this); }
public void Hide() { if (!mInitialized) { return; } for (int i = 0; i < Pages.Count; i++) { Pages[i].Hide(); } OnHide.SafeInvoke(); }
public virtual bool Minimize() { if (!Maximized || mMinimizing) { //Debug.Log("Already minimizing in " + name + ", proceeding"); return(true); } if (!ReadyToMinimize) { //Debug.Log("Not ready to minimize in " + name); return(false); } mMinimizing = true; SendToggleInterfaceAction(); GUIManager.Get.ReleaseFocus(this); for (int i = 0; i < MasterAnchors.Count; i++) { MasterAnchors[i].relativeOffset = Vector2.one; } if (MinimizeAvatarAction != AvatarAction.NoAction) { } mMaximized = false; MasterAudio.PlaySound(MasterAudio.SoundType.PlayerInterface, "InterfaceToggle"); //TODO optimize this OnHide.SafeInvoke(); //while we're here, run the garbage collector! players won't notice a slight lag System.GC.Collect(); mLastTimeMinimized = WorldClock.RealTime; mMinimizing = false; if (DisableGameObjectOnMinimize) { gameObject.SetActive(false); } return(true); }
public virtual void Hide() { if (!Manager.IsAwake <GUIManager>()) { return; } for (int i = 0; i < Panels.Count; i++) { if (Panels[i] == null) { Debug.Log("WTF panel waws null"); } Panels[i].enabled = false; } Visible = false; GUIManager.Get.ReleaseFocus(this); OnHide.SafeInvoke(); }