예제 #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");
            }
        }
    }
예제 #2
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");
                GUI.Label(new Rect(20, 28 * 6.5f, 250, 20), "Time: " + System.String.Format("{0:F2}", Time.time));
                GUI.Label(new Rect(20, 28 * 7, 250, 20), "FPS: " + System.String.Format("{0:F2}", curFPS));
                GUI.Label(new Rect(20, 28 * 7.5f, 250, 20), "   Min (Time): " + System.String.Format("{0:F2} ({1:F2})", minMaxFPS.x, minMaxFPSTime.x));
                GUI.Label(new Rect(20, 28 * 8.0f, 250, 20), "   Avg (Time): " + System.String.Format("{0:F2}", avgFPS.x / avgFPS.y));
                GUI.Label(new Rect(20, 28 * 8.5f, 250, 20), "   Max (Time): " + System.String.Format("{0:F2} ({1:F2})", minMaxFPS.y, minMaxFPSTime.y));
            }
            else
            {
                GUI.Label(new Rect(0, 50, 256, 24), "This Feature is Not Currently Available");
            }
        }
        else if (currentWindow == DebugWindow.CAVE2)
        {
            GUI.Label(new Rect(20, 50, 256, 24), "This Feature is Not Currently Available");
        }
        else if (currentWindow == DebugWindow.PlayerController)
        {
            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");
            }
        }
    }