Exemplo n.º 1
0
 private void OnDestroy()
 {
     if (this != instance)
     {
         return;
     }
     instance = null;
     tooltipWindow.Close();
 }
Exemplo n.º 2
0
 void Awake()
 {
     if (instance != null)
     {
         Destroy(this);
         return;
     }
     instance = this;
     DontDestroyOnLoad(gameObject);
     tooltipWindow = new TooltipWindow();
     tooltipWindow.Show(this);
 }
Exemplo n.º 3
0
        void main_window(int windowID)
        {
            switch (Anchor)
            {
            case AnchorPosition.TopLeft:
                GUILayout.BeginHorizontal();
                GUILayout.BeginVertical();
                draw_anchor();
                GUILayout.FlexibleSpace();
                GUILayout.EndVertical();
                GUILayout.BeginVertical();
                GUILayout.FlexibleSpace();
                DrawContent();
                GUILayout.FlexibleSpace();
                GUILayout.EndVertical();
                GUILayout.EndHorizontal();
                break;

            case AnchorPosition.TopRight:
                GUILayout.BeginHorizontal();
                GUILayout.BeginVertical();
                GUILayout.FlexibleSpace();
                DrawContent();
                GUILayout.FlexibleSpace();
                GUILayout.EndVertical();
                GUILayout.BeginVertical();
                draw_anchor();
                GUILayout.FlexibleSpace();
                GUILayout.EndVertical();
                GUILayout.EndHorizontal();
                break;

            case AnchorPosition.BottomLeft:
                GUILayout.BeginHorizontal();
                GUILayout.BeginVertical();
                GUILayout.FlexibleSpace();
                draw_anchor();
                GUILayout.EndVertical();
                GUILayout.BeginVertical();
                GUILayout.FlexibleSpace();
                DrawContent();
                GUILayout.FlexibleSpace();
                GUILayout.EndVertical();
                GUILayout.EndHorizontal();
                break;

            case AnchorPosition.BottomRight:
                GUILayout.BeginHorizontal();
                GUILayout.BeginVertical();
                GUILayout.FlexibleSpace();
                DrawContent();
                GUILayout.FlexibleSpace();
                GUILayout.EndVertical();
                GUILayout.BeginVertical();
                GUILayout.FlexibleSpace();
                draw_anchor();
                GUILayout.EndVertical();
                GUILayout.EndHorizontal();
                break;
            }
            //get tooltip for future display
            TooltipManager.GetTooltip();
            //move the window if requested
            if (moving)
            {
                GUI.DragWindow(ScreenRect);
            }
        }
Exemplo n.º 4
0
 public static void TooltipsAndDragWindow()
 {
     TooltipManager.GetTooltip();
     GUI.DragWindow(drag_handle);
 }