public virtual bool Maximize() { if (!GameManager.Is(FGameState.InGame | FGameState.GamePaused)) { //Debug.Log("Can't maximize in " + name + ", not in game or paused"); return(false); } if (Maximized || mMaximizing) { //Debug.Log("Already maximize in " + name + ", proceeding"); return(true); } if (!ReadyToMaximize) { //Debug.Log("Not ready to maximize in " + name); return(false); } if (!GUIManager.Get.GetFocus(this)) { //Debug.Log("Couldn't get focus to maximized in " + name); return(false); } mMaximizing = true; SendToggleInterfaceAction(); GetPlayerAttention = false; if (MaximizeAvatarAction != AvatarAction.NoAction) { //Player.Get.AvatarActions.ReceiveAction (MaximizeAvatarAction, WorldClock.AdjustedRealTime); } for (int i = 0; i < MasterAnchors.Count; i++) { MasterAnchors[i].relativeOffset = Vector2.zero; } if (DisableGameObjectOnMinimize) { gameObject.SetActive(true); } MinimizeAllBut(Name); mMaximized = true; OnShow.SafeInvoke(); //while we're here, run the garbage collector! players won't notice a slight lag System.GC.Collect(); mLastTimeMaximized = WorldClock.RealTime; mMaximizing = false; return(true); }
public void Show() { if (!mInitialized) { return; } OnShow.SafeInvoke(); SetSelection(DefaultPanel); }
/// <summary> /// Show the menu, providing the context that it was opened on /// </summary> /// <param name="renderLocation">Where to display the menu</param> /// <param name="context">The item that the menu was opened on</param> public void Show(Vector2 renderLocation, System.Object context) { if (IsShown && context == ContextObject) { return; } IsShown = true; ContextObject = context; drawPosition = renderLocation; canRemove = true; selectedPaths.Clear(); OnShow.SafeInvoke(this); }
public virtual void Show() { for (int i = 0; i < Panels.Count; i++) { Panels[i].enabled = true; } Visible = true; OnShow.SafeInvoke(); #if UNITY_EDITOR if (VRManager.VRMode | VRManager.VRTestingMode | Profile.Get.CurrentPreferences.Controls.ShowControllerPrompts) { #else if (VRManager.VRMode | Profile.Get.CurrentPreferences.Controls.ShowControllerPrompts) { #endif if (mScaledUp) { Debug.Log("Showing secondary interface, was scaled up, selecting first widget"); GUICursor.Get.SelectWidget(FirstInterfaceObject); } } }