protected void AddMenuItem(string itemName, SA_GUILayoutElement layout, bool forced = false) { //It could be 2 cases //1 When the window is created and we need to create everything //2 When Unity called Awake and only ScriptableObjects are destroyed, so we only need to re-create ScriptableObjects if (!m_isToolBarWasAlreadyCreated || forced) { var button = new SA_HyperLabel(new GUIContent(itemName), EditorStyles.boldLabel); button.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor); m_menuToolbar.AddButtons(button); } m_tabsLayout.Add(layout); layout.OnAwake(); }
//-------------------------------------- // Public Methods //-------------------------------------- public void AddSection(string name, SA_GUILayoutElement layout) { var section = new SA_PreferencesWindowSection(name, layout); m_sections.Add(section); }
public SA_PreferencesWindowSection(string name, SA_GUILayoutElement layout) { m_content = new GUIContent(name); m_layout = layout; }