コード例 #1
0
 public void DestroyEvent()
 {
     //if (ToolbarButton == null) return;
     //ApplicationLauncher.Instance.RemoveModApplication(ToolbarButton);
     //ToolbarButton = null;
     ToolbarInterface.GuiOff();
     //Visible = false;
     //DecayBreakdownVisible = false;
     //NBodyBreakdownVisible = false;
 }
コード例 #2
0
        public void MainWindow(int windowID)
        {
            if (centeredBigLabel == null)
            {
                centeredBigLabel           = new GUIStyle(GUI.skin.label);
                centeredBigLabel.fontSize  = 16;
                centeredBigLabel.alignment = TextAnchor.MiddleCenter;

                centeredLabel               = new GUIStyle(GUI.skin.label);
                centeredLabel.alignment     = TextAnchor.MiddleCenter;
                hSmallScrollBar             = new GUIStyle(GUI.skin.horizontalScrollbar);
                hSmallScrollBar.fixedHeight = 0f;
            }

            if (GUI.Button(new Rect(MainwindowPosition.width - 22, 3, 19, 19), "x"))
            {
                ToolbarInterface.GuiOff();
            }

            scrollPos = GUILayout.BeginScrollView(scrollPos, false, false, hSmallScrollBar, GUI.skin.verticalScrollbar);
            GUILayout.BeginVertical();
            GUILayout.Space(10);

#if false
            GUILayout.BeginHorizontal();
            for (int i = 0; i < tabs.Length; ++i)
            {
                if (GUILayout.Button(tabs[i]))
                {
                    currentTab = i;
                }
            }

            GUILayout.EndHorizontal();
            GUILayout.Space(10);
            switch (currentTab)
            {
            case 0:
                InformationTab();
                break;

            default:
                break;
            }
#else
            InformationTab();
#endif
            GUILayout.EndVertical();
            GUILayout.EndScrollView();
            GUI.DragWindow();
            MainwindowPosition.height = Math.Min(MainwindowPosition.height, Screen.height - 100);
            MainwindowPosition.x      = Mathf.Clamp(MainwindowPosition.x, 0f, Screen.width - MainwindowPosition.width);
            MainwindowPosition.y      = Mathf.Clamp(MainwindowPosition.y, 0f, Screen.height - MainwindowPosition.height);
        }
コード例 #3
0
        public void MainWindow(int windowID)
        {
            if (centeredBigLabel == null)
            {
                centeredBigLabel           = new GUIStyle(GUI.skin.label);
                centeredBigLabel.fontSize  = 16;
                centeredBigLabel.alignment = TextAnchor.MiddleCenter;

                centeredLabel           = new GUIStyle(GUI.skin.label);
                centeredLabel.alignment = TextAnchor.MiddleCenter;
            }
            if (GUI.Button(new Rect(MainwindowPosition.width - 22, 3, 18, 18), "x"))
            {
                ToolbarInterface.GuiOff();
                //if (ToolbarButton != null)
                //    ToolbarButton.toggleButton.Value = false;
            }
            GUILayout.BeginVertical();
            GUILayout.Space(10);
            GUILayout.BeginHorizontal();

            for (int i = 0; i < tabs.Length; ++i)
            {
                if (GUILayout.Button(tabs[i]))
                {
                    currentTab = i;
                }
            }

            GUILayout.EndHorizontal();
            GUILayout.Space(10);
            switch (currentTab)
            {
            case 0:
                InformationTab();
                break;

            case 1:
                SettingsTab();
                break;

            default:
                break;
            }
            GUILayout.EndVertical();
            GUI.DragWindow();
            MainwindowPosition.x = Mathf.Clamp(MainwindowPosition.x, 0f, Screen.width - MainwindowPosition.width);
            MainwindowPosition.y = Mathf.Clamp(MainwindowPosition.y, 0f, Screen.height - MainwindowPosition.height);
        }
コード例 #4
0
 public void DestroyEvent()
 {
     ToolbarInterface.GuiOff();
 }