Пример #1
0
    /// <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;
    }
Пример #2
0
 /// <summary>
 /// Dismiss this window.
 /// </summary>
 public virtual bool Dismiss()
 {
     return(GJHWindowsManager.DismissWindow(windowID));
 }
Пример #3
0
 /// <summary>
 /// Show this window.
 /// </summary>
 public virtual bool Show()
 {
     return(GJHWindowsManager.ShowWindow(windowID));
 }
Пример #4
0
 /// <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));
 }
Пример #5
0
 /// <summary>
 /// Releases unmanaged resources and performs other cleanup operations before the application quit.
 /// </summary>
 void OnApplicationQuit()
 {
     windows  = null;
     instance = null;
 }
Пример #6
0
 /// <summary>
 /// Releases unmanaged resources and performs other cleanup operations before the application quit.
 /// </summary>
 void OnApplicationQuit()
 {
     windows = null;
     instance = null;
 }
Пример #7
0
 /// <summary>
 /// Releases unmanaged resources and performs other cleanup operations before the application quit.
 /// </summary>
 void OnDestroy()
 {
     windows  = null;
     instance = null;
 }