/// <summary> /// Initializes a new instance of the <see cref="GJHWindow"/> class. /// </summary> public GJHWindow() { Title = "Base Window"; Position = new Rect(Screen.width / 2 - 150, Screen.height / 2 - 50, 300, 100); windowID = GJHWindowsManager.RegisterWindow(this); drawWindowDelegates = new Dictionary <string, DrawWindowDelegate> (); drawWindowDelegates.Add(BaseWindowStates.Empty.ToString(), DrawWindowEmpty); drawWindowDelegates.Add(BaseWindowStates.Process.ToString(), DrawWindowProcessing); drawWindowDelegates.Add(BaseWindowStates.Success.ToString(), DrawWindowSuccess); drawWindowDelegates.Add(BaseWindowStates.Error.ToString(), DrawWindowError); errorStyle = GJAPIHelper.Skin.FindStyle("ErrorMsg") ?? GJAPIHelper.Skin.label; successStyle = GJAPIHelper.Skin.FindStyle("SuccessMsg") ?? GJAPIHelper.Skin.label; ellipsisStyle = GJAPIHelper.Skin.FindStyle("Ellipsis") ?? GJAPIHelper.Skin.label; }
/// <summary> /// Dismiss this window. /// </summary> public virtual bool Dismiss() { return(GJHWindowsManager.DismissWindow(windowID)); }
/// <summary> /// Show this window. /// </summary> public virtual bool Show() { return(GJHWindowsManager.ShowWindow(windowID)); }
/// <summary> /// Determines whether this window is showing. /// </summary> /// <returns> /// <c>true</c> if this window is showing; otherwise, <c>false</c>. /// </returns> public bool IsShowing() { return(GJHWindowsManager.IsWindowShowing(windowID)); }
/// <summary> /// Releases unmanaged resources and performs other cleanup operations before the application quit. /// </summary> void OnApplicationQuit() { windows = null; instance = null; }
/// <summary> /// Releases unmanaged resources and performs other cleanup operations before the application quit. /// </summary> void OnDestroy() { windows = null; instance = null; }