Example #1
0
        private void OnGUI()
        {
            CreateTabs();

            UIHelpers.SetupStyles();

            EditorGUI.BeginChangeCheck();
            currentTab = GUILayout.Toolbar(currentTab, tabsNames, GUILayout.ExpandWidth(false));
            if (EditorGUI.EndChangeCheck())
            {
                if (currentTab == 1)
                {
                    ShowProjectCleanerWarning();
                }

                MaintainerSettings.Instance.selectedTabIndex = currentTab;
                MaintainerSettings.Save();
            }

            if (currentTab == 0)
            {
                issuesTab.Draw(this);
            }
            else if (currentTab == 1)
            {
                cleanerTab.Draw(this);
            }
            else if (currentTab == 2)
            {
                aboutTab.Draw(this);
            }
        }
Example #2
0
        private void OnGUI()
        {
            UIHelpers.SetupStyles();

            UserSettings.Instance.scroll =
                GUILayout.BeginScrollView(UserSettings.Instance.scroll, false, false);

            EditorGUI.BeginChangeCheck();
            currentTab = (MaintainerTab)GUILayout.Toolbar((int)currentTab, tabsCaptions, GUILayout.ExpandWidth(false), GUILayout.Height(21));
            if (EditorGUI.EndChangeCheck())
            {
                if (currentTab == MaintainerTab.Cleaner)
                {
                    ShowProjectCleanerWarning();
                }
                UserSettings.Instance.selectedTab = currentTab;

                Refresh(false);
            }

            switch (currentTab)
            {
            case MaintainerTab.Issues:
                issuesTab.Draw();
                break;

            case MaintainerTab.Cleaner:
                cleanerTab.Draw();
                break;

            case MaintainerTab.References:
                referencesTab.Draw();
                break;

            case MaintainerTab.About:
                aboutTab.Draw();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            GUILayout.EndScrollView();
        }
        private void OnGUI()
        {
            UIHelpers.SetupStyles();

            EditorGUI.BeginChangeCheck();
            currentTab = GUILayout.Toolbar(currentTab, tabs, GUILayout.ExpandWidth(false));
            if (EditorGUI.EndChangeCheck())
            {
                MaintainerSettings.Instance.selectedTabIndex = currentTab;
                EditorUtility.SetDirty(MaintainerSettings.Instance);
            }

            if (currentTab == 0)
            {
                IssuesTab.Draw(this);
            }
            else if (currentTab == 1)
            {
                AboutTab.Draw(this);
            }
        }