示例#1
0
    void OnMainWindow(int windowID)
    {
        GUI.DragWindow(new Rect(0, 0, 10000, 20));

        currentWindow = (DebugWindow)GUI.SelectionGrid(new Rect(10, 20, 480, 24), (int)currentWindow, windowStrings, 4);



        if (currentWindow == DebugWindow.Omicron)
        {
            if (omgManager != null)
            {
                omgManager.SetGUIOffSet(new Vector2(0, 50));
                omgManager.OnWindow(windowID);

                showFPS          = GUI.Toggle(new Rect(20, 25 * 7, 250, 20), showFPS, "Show FPS");
                showOnlyOnMaster = GUI.Toggle(new Rect(20, 25 * 8, 250, 20), showOnlyOnMaster, "Show FPS only on master");
            }
            else
            {
                GUI.Label(new Rect(0, 50, 256, 24), "This Feature is Not Currently Available");
            }
        }
        else if (currentWindow == DebugWindow.CAVE2)
        {
            if (cave2manager != null)
            {
                cave2manager.SetGUIOffSet(new Vector2(0, 50));
                cave2manager.OnWindow(windowID);
            }
            else
            {
                GUI.Label(new Rect(20, 50, 256, 24), "This Feature is Not Currently Available");
            }
        }
        else if (currentWindow == DebugWindow.PlayerController)
        {
            if (playerController != null)
            {
                playerController.SetGUIOffSet(new Vector2(0, 25));
                playerController.OnWindow(windowID);
            }
            else
            {
                GUI.Label(new Rect(20, 50, 256, 24), "This Feature is Not Currently Available");
            }
        }
        else if (currentWindow == DebugWindow.App)
        {
            if (appMenu != null)
            {
                appMenu.SendMessage("SetGUIOffSet", new Vector2(0, 25));
                appMenu.SendMessage("OnWindow", windowID);
            }
            else
            {
                GUI.Label(new Rect(20, 50, 256, 24), "This Feature is Not Currently Available");
            }
        }
    }