Beispiel #1
0
    public void OnGUI()
    {
        DrawLogo(GUILayout.ExpandWidth(true));
        if (GUI.Button(GUILayoutUtility.GetLastRect(), XResources.LogoTexture))
        {
            this.Close();
            string cmdPrefs = GetType().ToString() + "_isPrefix";
            bool   isPrefix = EditorPrefs.GetBool(cmdPrefs, false);
            EditorPrefs.SetBool(cmdPrefs, !isPrefix);
            XBaseWindow window = EditorWindow.GetWindow(GetType(), !isPrefix, GetType().Name, true) as XBaseWindow;
            window.OnInitialization(closeRecordArgs);
            return;
        }
        if (isAutoScroll)
        {
            _scrollPos = EditorGUILayout.BeginScrollView(_scrollPos);
        }

        OnXGUI();

        if (isAutoScroll)
        {
            EditorGUILayout.EndScrollView();
        }
    }