private SA_HyperLabel CreateTextLabel(string title)
        {
            var label = new SA_HyperLabel(new GUIContent(title), SA_PluginSettingsWindowStyles.SelectebleLabelStyle);

            label.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor);
            return(label);
        }
        //--------------------------------------
        // SA_GUILayoutElement implementation
        //--------------------------------------

        public override void OnAwake()
        {
            m_blockTitleLabel = new SA_HyperLabel(new GUIContent(Title), SA_PluginSettingsWindowStyles.LabelServiceBlockStyle);
            m_blockTitleLabel.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor);

            m_blockAPIStateLabel = new SA_HyperLabel(new GUIContent("OFF"), OffStyle);
            m_blockAPIStateLabel.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor);


            m_expandOpenIcon   = SA_Skin.GetGenericIcon("expand.png");
            m_expandClosedIcon = SA_Skin.GetGenericIcon("expand_close.png");
            m_showMoreButton   = new SA_HyperLabel(new GUIContent(m_expandOpenIcon));
            m_showMoreButton.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor);



            m_onToggle        = SA_Skin.GetGenericIcon("on_toggle.png");
            m_offToggle       = SA_Skin.GetGenericIcon("off_toggle.png");
            m_apiEnableButton = new SA_HyperLabel(new GUIContent(m_onToggle));
            m_apiEnableButton.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor);
            m_apiEnableButton.GuiColorOverride(true);

            m_ShowExtraFields = new AnimBool(false);

            m_features = new List <SA_FeatureUrl>();
        }
        private SA_HyperLabel CreateLabel(string title, string icon, string iconFolder)
        {
            var image = SA_EditorAssets.GetTextureAtPath(iconFolder + icon);
            var label = new SA_HyperLabel(new GUIContent(title, image), SA_EditorStyles.DescribtionLabelStyle);

            label.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor);
            return(label);
        }
Example #4
0
        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();
        }
        private void OnLayoutEnable()
        {
            foreach (var layout in m_tabsLayout)
            {
                layout.OnLayoutEnable();
            }

            m_documentationLink = new SA_HyperLabel(new GUIContent("Go To Documentation"), EditorStyles.miniLabel);
            m_documentationLink.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor);

            //Update toolbar Styles
            foreach (var button in m_menuToolbar.Buttons)
            {
                button.SetStyle(EditorStyles.boldLabel);
                button.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor);
            }
        }
Example #6
0
        public SA_CollapsableWindowBlockLayout(GUIContent content, Action onGUI)
        {
            if (content.image != null)
            {
                content.text = " " + content.text;
            }

            m_onGUI  = onGUI;
            m_header = new SA_HyperLabel(content, SA_PluginSettingsWindowStyles.ServiceBlockHeader);
            m_header.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor);

            var rightArrow = SA_Skin.GetGenericIcon("arrow_right.png");
            var arrow_down = SA_Skin.GetGenericIcon("arrow_down.png");

            m_collapsedContent = new GUIContent(rightArrow);
            m_expandedContent  = new GUIContent(arrow_down);


            m_arrrow = new SA_HyperLabel(m_collapsedContent, SA_PluginSettingsWindowStyles.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_support_mail = CreateTextLabel(SA_Config.k_StansAssetsSupportEmail);
            m_ceo_mail     = CreateTextLabel(SA_Config.k_StansAssetsCeoEMail);


            web_siteLabel = new SA_HyperLabel(new GUIContent(SA_CompanyGUILayout.Logo), SA_EditorStyles.DescribtionLabelStyle);
            web_siteLabel.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor);
        }