protected virtual bool DrawServiceStateInfo() { var click = m_blockAPIStateLabel.Draw(GUILayout.Height(25), GUILayout.Width(32)); GUILayout.Space(5); return(click); }
private void DrawDocumentationLink() { var width = m_documentationLink.CalcSize().x + 5f; var clicked = m_documentationLink.Draw(GUILayout.Width(width)); if (clicked) { Application.OpenURL(m_documentationUrl); } }
protected void DrawDocumnetationLink() { float width = m_documentationLink.CalcSize().x + 5f; bool clicked = m_documentationLink.Draw(GUILayout.Width(width)); if (clicked) { Application.OpenURL(m_documentationUrl); } }
protected virtual void DrawServiceStateInteractive() { if (CanBeDisabled) { var click = m_apiEnableButton.Draw(GUILayout.Width(50), GUILayout.Height(25)); if (click) { GUI.changed = true; Resolver.IsSettingsEnabled = !Resolver.IsSettingsEnabled; } } }
public void OnGUI() { GUILayout.Space(5); using (new SA_GuiBeginHorizontal()) { GUILayout.Space(10); var content = m_collapsedContent; if (m_showExtraFields.target) { content = m_expandedContent; } m_arrrow.SetContent(content); bool arClick = m_arrrow.Draw(GUILayout.Width(20)); GUILayout.Space(-5); float headerWidth = m_header.CalcSize().x; bool click = m_header.Draw(GUILayout.Width(headerWidth)); if (click || arClick) { m_showExtraFields.target = !m_showExtraFields.target; } OnAfterHeaderGUI(); } using (new SA_GuiHorizontalSpace(10)) { if (EditorGUILayout.BeginFadeGroup(m_showExtraFields.faded)) { GUILayout.Space(5); m_onGUI.Invoke(); GUILayout.Space(5); } EditorGUILayout.EndFadeGroup(); } GUILayout.Space(5); EditorGUILayout.BeginVertical(SA_PluginSettingsWindowStyles.SeparationStyle); GUILayout.Space(5); EditorGUILayout.EndVertical(); }
private void DrawBlockUI(string pattern = null) { GUILayout.Space(5); bool titleClick; bool toggleClick; using (new SA_GuiBeginHorizontal()) { GUILayout.Space(10); GUILayout.Label(Icon, SA_PluginSettingsWindowStyles.LabelServiceBlockStyle, GUILayout.Width(IconSize), GUILayout.Height(IconSize)); GUILayout.Space(5); using (new SA_GuiBeginVertical()) { GUILayout.Space(TitleVerticalSpace); titleClick = m_blockTitleLabel.Draw(GUILayout.Height(25)); } GUILayout.FlexibleSpace(); toggleClick = DrawServiceStateInfo(); } if (titleClick || toggleClick) { m_isSelected = true; } GUILayout.Space(5); using (new SA_GuiBeginHorizontal()) { GUILayout.Space(15); EditorGUILayout.LabelField(Description, SA_PluginSettingsWindowStyles.DescribtionLabelStyle); if (Event.current.type == EventType.Repaint) { m_labelRect = GUILayoutUtility.GetLastRect(); } GUILayout.FlexibleSpace(); using (new SA_GuiBeginVertical()) { GUILayout.Space(m_labelRect.height - DESCRIPTION_LABEL_ONE_LINE_HEIGHT); var click = m_showMoreButton.Draw(GUILayout.Height(22), GUILayout.Width(22)); if (click) { if (m_ShowExtraFields.faded.Equals(0f) || m_ShowExtraFields.faded.Equals(1f)) { m_ShowExtraFields.target = !m_ShowExtraFields.target; if (m_ShowExtraFields.target) { m_showMoreButton.SetContent(new GUIContent(m_expandClosedIcon)); } else { m_showMoreButton.SetContent(new GUIContent(m_expandOpenIcon)); } } } } GUILayout.Space(5); } if (EditorGUILayout.BeginFadeGroup(m_ShowExtraFields.faded)) { GUILayout.Space(5); DrawFeaturesList(pattern); GUILayout.Space(5); } EditorGUILayout.EndFadeGroup(); GUILayout.Space(5); EditorGUILayout.BeginVertical(SA_PluginSettingsWindowStyles.SeparationStyle); GUILayout.Space(5); EditorGUILayout.EndVertical(); }
public override void OnGUI() { using (new SA_WindowBlockWithIndent(new GUIContent("Who we are"))) { EditorGUILayout.LabelField(m_whoWeAre, SA_EditorStyles.DescribtionLabelStyle); EditorGUILayout.Space(); } using (new SA_WindowBlockWithIndent(new GUIContent("What we do"))) { EditorGUILayout.LabelField(m_whatWeDo, SA_EditorStyles.DescribtionLabelStyle); EditorGUILayout.Space(); EditorGUILayout.Space(); using (new SA_GuiBeginHorizontal()) { bool games = m_games.Draw(GUILayout.Width(LABEL_WIDTH)); if (games) { Application.OpenURL("https://stansassets.com/#portfolio"); } bool plugins = m_plugins.Draw(GUILayout.Width(LABEL_WIDTH)); if (plugins) { Application.OpenURL("https://assetstore.unity.com/publishers/2256"); } EditorGUILayout.Space(); } EditorGUILayout.Space(); using (new SA_GuiBeginHorizontal()) { bool team = m_team.Draw(GUILayout.Width(LABEL_WIDTH)); if (team) { Application.OpenURL(" https://stansassets.com/#our-team"); } EditorGUILayout.Space(); } } bool clicked; using (new SA_WindowBlockWithIndent(new GUIContent("How to get in touch"))) { using (new SA_GuiBeginHorizontal()) { EditorGUILayout.LabelField("If you have any technical issues or questions, do not hesitate to drop us a message at:", SA_EditorStyles.DescribtionLabelStyle); } using (new SA_GuiBeginHorizontal()) { if (m_support_mail.Draw()) { Application.OpenURL("mailto:" + SA_Config.k_StansAssetsSupportEmail); } } EditorGUILayout.Space(); using (new SA_GuiBeginHorizontal()) { EditorGUILayout.LabelField("For a non technical and business related questions, use:", SA_EditorStyles.DescribtionLabelStyle); } using (new SA_GuiBeginHorizontal()) { clicked = m_ceo_mail.Draw(); if (clicked) { Application.OpenURL("mailto:" + SA_Config.k_StansAssetsCeoEMail); } } EditorGUILayout.Space(); using (new SA_GuiBeginHorizontal()) { EditorGUILayout.LabelField("Let's just be in touch", SA_EditorStyles.DescribtionLabelStyle); } EditorGUILayout.Space(); using (new SA_GuiBeginHorizontal()) { clicked = m_linkedIn.Draw(GUILayout.Width(SOCIAL_LABEL_WIDTH)); if (clicked) { Application.OpenURL("https://www.linkedin.com/in/lacost"); } clicked = m_twitter.Draw(GUILayout.Width(SOCIAL_LABEL_WIDTH)); if (clicked) { Application.OpenURL("https://twitter.com/stansassets"); } clicked = m_facebook.Draw(GUILayout.Width(SOCIAL_LABEL_WIDTH)); if (clicked) { Application.OpenURL("https://www.facebook.com/stansassets/"); } EditorGUILayout.Space(); } EditorGUILayout.Space(); using (new SA_GuiBeginHorizontal()) { clicked = m_youtube.Draw(GUILayout.Width(SOCIAL_LABEL_WIDTH)); if (clicked) { Application.OpenURL("https://www.youtube.com/user/stansassets/videos"); } clicked = m_google.Draw(GUILayout.Width(SOCIAL_LABEL_WIDTH)); if (clicked) { Application.OpenURL("https://plus.google.com/+StansassetsOfficial"); } clicked = m_twitch.Draw(GUILayout.Width(SOCIAL_LABEL_WIDTH)); if (clicked) { Application.OpenURL("https://www.twitch.tv/stans_assets"); } EditorGUILayout.Space(); } EditorGUILayout.Space(); using (new SA_GuiBeginHorizontal()) { clicked = web_siteLabel.Draw(); if (clicked) { Application.OpenURL(SA_Config.k_StansAssetsWebsiteRootUrl); } } } }