示例#1
0
        void DrawDocumentationLink()
        {
            var width   = m_DocumentationLink.CalcSize().x + 5f;
            var clicked = m_DocumentationLink.Draw(GUILayout.Width(width));

            if (clicked)
            {
                Application.OpenURL(m_DocumentationUrl);
            }
        }
        public void OnGUI()
        {
            GUILayout.Space(5);
            using (new IMGUIBeginHorizontal())
            {
                GUILayout.Space(10);

                var content = m_CollapsedContent;
                if (m_ShowExtraFields.target)
                {
                    content = m_ExpandedContent;
                }

                m_Arrow.SetContent(content);
                var arClick = m_Arrow.Draw(GUILayout.Width(20));
                GUILayout.Space(-5);

                var headerWidth = m_Header.CalcSize().x;
                var click       = m_Header.Draw(GUILayout.Width(headerWidth));
                if (click || arClick)
                {
                    m_ShowExtraFields.target = !m_ShowExtraFields.target;
                }

                OnAfterHeaderGUI();
            }

            using (new IMGUIHorizontalSpace(10))
            {
                if (EditorGUILayout.BeginFadeGroup(m_ShowExtraFields.faded))
                {
                    GUILayout.Space(5);
                    m_OnGUI.Invoke();
                    GUILayout.Space(5);
                }

                EditorGUILayout.EndFadeGroup();
            }

            GUILayout.Space(5);
            EditorGUILayout.BeginVertical(SettingsWindowStyles.SeparationStyle);
            GUILayout.Space(5);
            EditorGUILayout.EndVertical();
        }
        public override void OnGUI()
        {
            using (new IMGUIWindowBlockWithIndent(new GUIContent("Who we are")))
            {
                EditorGUILayout.LabelField(m_WhoWeAre, SettingsWindowStyles.DescriptionLabelStyle);
                EditorGUILayout.Space();
            }

            using (new IMGUIWindowBlockWithIndent(new GUIContent("What we do")))
            {
                EditorGUILayout.LabelField(m_WhatWeDo, SettingsWindowStyles.DescriptionLabelStyle);
                EditorGUILayout.Space();

                EditorGUILayout.Space();
                using (new IMGUIBeginHorizontal())
                {
                    var games = m_Games.Draw(GUILayout.Width(k_LabelWidth));
                    if (games)
                    {
                        Application.OpenURL("https://stansassets.com/#portfolio");
                    }

                    var plugins = m_Plugins.Draw(GUILayout.Width(k_LabelWidth));
                    if (plugins)
                    {
                        Application.OpenURL("https://assetstore.unity.com/publishers/2256");
                    }

                    EditorGUILayout.Space();
                }

                EditorGUILayout.Space();
                using (new IMGUIBeginHorizontal())
                {
                    var team = m_Team.Draw(GUILayout.Width(k_LabelWidth));
                    if (team)
                    {
                        Application.OpenURL(" https://stansassets.com/#our-team");
                    }

                    EditorGUILayout.Space();
                }
            }

            using (new IMGUIWindowBlockWithIndent(new GUIContent("How to get in touch")))
            {
                using (new IMGUIBeginHorizontal())
                {
                    EditorGUILayout.LabelField("If you have any technical issues or questions, do not hesitate to drop us a message at:", SettingsWindowStyles.DescriptionLabelStyle);
                }

                using (new IMGUIBeginHorizontal())
                {
                    if (m_SupportMail.Draw())
                    {
                        Application.OpenURL("mailto:" + PluginsDevKitPackage.StansAssetsSupportEmail);
                    }
                }

                EditorGUILayout.Space();
                using (new IMGUIBeginHorizontal())
                {
                    EditorGUILayout.LabelField("For a non technical and business related questions, use:", SettingsWindowStyles.DescriptionLabelStyle);
                }

                bool clicked;
                using (new IMGUIBeginHorizontal())
                {
                    clicked = m_CeoMail.Draw();
                    if (clicked)
                    {
                        Application.OpenURL("mailto:" + PluginsDevKitPackage.StansAssetsCeoEMail);
                    }
                }

                EditorGUILayout.Space();
                using (new IMGUIBeginHorizontal())
                {
                    EditorGUILayout.LabelField("Let's just be in touch", SettingsWindowStyles.DescriptionLabelStyle);
                }

                EditorGUILayout.Space();
                using (new IMGUIBeginHorizontal())
                {
                    clicked = m_LinkedIn.Draw(GUILayout.Width(k_SocialLabelWidth));
                    if (clicked)
                    {
                        Application.OpenURL("https://www.linkedin.com/in/lacost");
                    }
                    clicked = m_Twitter.Draw(GUILayout.Width(k_SocialLabelWidth));
                    if (clicked)
                    {
                        Application.OpenURL("https://twitter.com/stansassets");
                    }
                    clicked = m_Facebook.Draw(GUILayout.Width(k_SocialLabelWidth));
                    if (clicked)
                    {
                        Application.OpenURL("https://www.facebook.com/stansassets/");
                    }

                    EditorGUILayout.Space();
                }

                EditorGUILayout.Space();
                using (new IMGUIBeginHorizontal())
                {
                    clicked = m_Youtube.Draw(GUILayout.Width(k_SocialLabelWidth));
                    if (clicked)
                    {
                        Application.OpenURL("https://www.youtube.com/user/stansassets/videos");
                    }

                    clicked = m_Google.Draw(GUILayout.Width(k_SocialLabelWidth));
                    if (clicked)
                    {
                        Application.OpenURL("https://plus.google.com/+StansassetsOfficial");
                    }

                    clicked = m_Twitch.Draw(GUILayout.Width(k_SocialLabelWidth));
                    if (clicked)
                    {
                        Application.OpenURL("https://www.twitch.tv/stans_assets");
                    }

                    EditorGUILayout.Space();
                }

                EditorGUILayout.Space();

                using (new IMGUIBeginHorizontal())
                {
                    clicked = m_WebSiteLabel.Draw();
                    if (clicked)
                    {
                        Application.OpenURL(PluginsDevKitPackage.StansAssetsWebsiteRootUrl);
                    }
                }
            }
        }