Пример #1
0
        protected int DrawTabs()
        {
            GUILayout.Space(2);

            int index;

            using (new IMGUIBeginHorizontal())
            {
                using (new IMGUIBeginVertical())
                {
                    index = m_MenuToolbar.Draw();
                }

                var add = m_AddButton.Draw(GUILayout.Width(20));
                if (add)
                {
                    var conf = BuildConfigurationSettings.Instance.BuildConfigurations[m_SelectionIndex];
                    var copy = conf.Copy();
                    BuildConfigurationSettings.Instance.BuildConfigurations.Add(copy);
                    AddBuildConfigurationTab(copy.Name);
                    GUIUtility.ExitGUI();
                }
            }

            GUILayout.Space(4);

            EditorGUILayout.BeginVertical(SettingsWindowStyles.SeparationStyle);
            GUILayout.Space(5);
            EditorGUILayout.EndVertical();

            return(index);
        }
        protected override void OnAfterHeaderGUI()
        {
            var capability = m_GETCapability();

            if (capability.Enabled)
            {
                m_StateLabel.SetContent(m_ON);
                m_StateLabel.SetColor(SettingsWindowStyles.SelectedElementColor);
            }
            else
            {
                m_StateLabel.SetContent(m_Off);
                m_StateLabel.SetColor(m_NormalColor);
            }

            GUILayout.FlexibleSpace();
            var click = m_StateLabel.Draw(GUILayout.Width(40));

            if (click)
            {
                capability.Enabled = !capability.Enabled;
            }
        }