Пример #1
0
    private void OnGUI()
    {
        if (bIsVisible)
        {
            GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Width((float)Screen.width) };
            GUILayout.BeginVertical(options);

            GUIStyles.BeginCustomSkin(_imageFiles, _settings);

            float consoleHeight = GetConsoleHeight();

            Rect = new Rect(0f, 0f, Screen.width, consoleHeight);
            GUI.Window(0x1001, Rect,
                       new GUI.WindowFunction(WindowFunc), "",
                       GUIStyles.ConsoleWindowBackgroundStyle
                       );

            //显示预设命令行UI
            if (_helperOverLay.bIsVisible)
            {
                _helperOverLay.OnGUI(
                    new Rect(0, consoleHeight, Screen.width, Screen.height - consoleHeight)
                    );
            }
            else if (_logModules.BIsVisible)
            {
                _logModules.OnGUI(
                    new Rect(0, consoleHeight, Screen.width, Screen.height - consoleHeight)
                    );
            }
            else
            {
            }

            GUIStyles.EndCustomSkin();

            GUILayout.EndVertical();
        }
    }