IMGUIHyperLabel CreateTextLabel(string title) { var label = new IMGUIHyperLabel(new GUIContent(title), SettingsWindowStyles.SelectableLabelStyle); label.SetMouseOverColor(SettingsWindowStyles.SelectedElementColor); return(label); }
IMGUIHyperLabel CreateLabel(string title, string icon, string iconFolder) { var image = EditorAssetDatabase.GetTextureAtPath(iconFolder + icon); var label = new IMGUIHyperLabel(new GUIContent(title, image), SettingsWindowStyles.DescriptionLabelStyle); label.SetMouseOverColor(SettingsWindowStyles.SelectedElementColor); return(label); }
protected void AddMenuItem(string itemName, IMGUILayoutElement 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 IMGUIHyperLabel(new GUIContent(itemName), EditorStyles.boldLabel); button.SetMouseOverColor(SettingsWindowStyles.SelectedElementColor); m_MenuToolbar.AddButtons(button); } m_TabsLayout.Add(layout); layout.OnAwake(); }
public IMGUICollapsableWindowBlockLayout(GUIContent content, Action onGUI) { if (content.image != null) { content.text = " " + content.text; } m_OnGUI = onGUI; m_Header = new IMGUIHyperLabel(content, SettingsWindowStyles.ServiceBlockHeader); m_Header.SetMouseOverColor(SettingsWindowStyles.SelectedElementColor); var rightArrow = PluginsEditorSkin.GetGenericIcon("arrow_right.png"); var arrowDown = PluginsEditorSkin.GetGenericIcon("arrow_down.png"); m_CollapsedContent = new GUIContent(rightArrow); m_ExpandedContent = new GUIContent(arrowDown); m_Arrow = new IMGUIHyperLabel(m_CollapsedContent, SettingsWindowStyles.ServiceBlockHeader); }
public override void OnLayoutEnable() { m_Games = CreateAboutLabel(" Our Games", "game.png"); m_Plugins = CreateAboutLabel(" Our Plugins", "plugin.png"); m_Team = CreateAboutLabel(" Our Team", "team.png"); m_LinkedIn = CreateSocialLabel("LinkedIn", "linkedin.png"); m_Twitter = CreateSocialLabel("Twitter", "twitter.png"); m_Facebook = CreateSocialLabel("Facebook", "facebook.png"); m_Youtube = CreateSocialLabel("Youtube", "youtube.png"); m_Google = CreateSocialLabel("Google+", "google-plus.png"); m_Twitch = CreateSocialLabel("Twitch", "twitch.png"); m_SupportMail = CreateTextLabel(PluginsDevKitPackage.StansAssetsSupportEmail); m_CeoMail = CreateTextLabel(PluginsDevKitPackage.StansAssetsCeoEMail); m_WebSiteLabel = new IMGUIHyperLabel(new GUIContent(IMGUICompanyGUILayout.Logo), SettingsWindowStyles.DescriptionLabelStyle); m_WebSiteLabel.SetMouseOverColor(SettingsWindowStyles.SelectedElementColor); }
void OnLayoutEnable() { foreach (var layout in m_TabsLayout) { layout.OnLayoutEnable(); } m_ToolbarSearchTextFieldStyle = GUI.skin.FindStyle("ToolbarSeachTextField"); m_ToolbarSearchCancelButtonStyle = GUI.skin.FindStyle("ToolbarSeachCancelButton"); m_DocumentationLink = new IMGUIHyperLabel(new GUIContent("Go To Documentation"), EditorStyles.miniLabel); m_DocumentationLink.SetMouseOverColor(SettingsWindowStyles.SelectedElementColor); //Update toolbar Styles foreach (var button in m_MenuToolbar.Buttons) { button.SetStyle(EditorStyles.boldLabel); button.SetMouseOverColor(SettingsWindowStyles.SelectedElementColor); } }