protected static void showAbout() { GUILayout.Label(Constants.ASSET_NAME, EditorStyles.boldLabel); GUILayout.Label("Version:\t" + Constants.ASSET_VERSION); GUILayout.Space(6); GUILayout.Label("Web:\t" + Constants.ASSET_AUTHOR_URL); GUILayout.Label("Email:\t" + Constants.ASSET_CONTACT); GUILayout.Space(12); GUILayout.Label("© 2015-2016 by " + Constants.ASSET_AUTHOR); EditorHelper.SeparatorUI(); if (worker == null || (worker != null && !worker.IsAlive)) { if (GUILayout.Button(new GUIContent("Check for update", "Checks for available updates of " + Constants.ASSET_NAME))) { worker = new Thread(() => UpdateCheck.UpdateCheckForEditor(out updateText)); worker.Start(); } } else { GUILayout.Label("Checking... Please wait.", EditorStyles.boldLabel); } Color fgColor = GUI.color; if (updateText.Equals(UpdateCheck.TEXT_NOT_CHECKED)) { GUI.color = Color.cyan; GUILayout.Label(updateText); } else if (updateText.Equals(UpdateCheck.TEXT_NO_UPDATE)) { GUI.color = Color.green; GUILayout.Label(updateText); } else { GUI.color = Color.yellow; GUILayout.Label(updateText); if (GUILayout.Button(new GUIContent("Download", "Opens the 'Unity AssetStore' for downloading the latest version."))) { Application.OpenURL(Constants.ASSET_URL); } } GUI.color = fgColor; EditorHelper.SeparatorUI(); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button(new GUIContent("Manual", "Opens the manual."))) { Application.OpenURL(Constants.ASSET_MANUAL_URL); } if (GUILayout.Button(new GUIContent("API", "Opens the API."))) { Application.OpenURL(Constants.ASSET_API_URL); } if (GUILayout.Button(new GUIContent("Forum", "Opens the forum page."))) { Application.OpenURL(Constants.ASSET_FORUM_URL); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button(new GUIContent("Unity AssetStore", "Opens the 'Unity AssetStore' page."))) { Application.OpenURL(Constants.ASSET_URL); } if (GUILayout.Button(new GUIContent("Product", "Opens the product page."))) { Application.OpenURL(Constants.ASSET_CT_URL); } if (GUILayout.Button(new GUIContent(Constants.ASSET_AUTHOR, "Opens the 'crosstales' page."))) { Application.OpenURL(Constants.ASSET_AUTHOR_URL); } EditorGUILayout.EndHorizontal(); }
protected static void showAbout() { scrollPosAbout = EditorGUILayout.BeginScrollView(scrollPosAbout, false, false); { GUILayout.Label(Util.Constants.ASSET_NAME, EditorStyles.boldLabel); GUILayout.BeginHorizontal(); { GUILayout.BeginVertical(GUILayout.Width(60)); { GUILayout.Label("Version:"); GUILayout.Space(12); GUILayout.Label("Web:"); GUILayout.Space(2); GUILayout.Label("Email:"); } GUILayout.EndVertical(); GUILayout.BeginVertical(GUILayout.Width(170)); { GUILayout.Space(0); GUILayout.Label(Util.Constants.ASSET_VERSION); GUILayout.Space(12); EditorGUILayout.SelectableLabel(Util.Constants.ASSET_AUTHOR_URL, GUILayout.Height(16), GUILayout.ExpandHeight(false)); GUILayout.Space(2); EditorGUILayout.SelectableLabel(Util.Constants.ASSET_CONTACT, GUILayout.Height(16), GUILayout.ExpandHeight(false)); } GUILayout.EndVertical(); GUILayout.BeginVertical(GUILayout.ExpandWidth(true)); { //GUILayout.Space(0); } GUILayout.EndVertical(); GUILayout.BeginVertical(GUILayout.Width(64)); { //GUILayout.Label(logo_asset, GUILayout.Height(80)); if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Logo_Asset, "Visit asset website"))) { Application.OpenURL(Util.Constants.ASSET_URL); } if (!Util.Constants.isPro) { if (GUILayout.Button(new GUIContent("Upgrade", "Upgrade " + Util.Constants.ASSET_NAME + " to the PRO-version"))) { Application.OpenURL(Util.Constants.ASSET_PRO_URL); } } } GUILayout.EndVertical(); } GUILayout.EndHorizontal(); //GUILayout.Space(12); GUILayout.Label("© 2015-2017 by " + Util.Constants.ASSET_AUTHOR); EditorHelper.SeparatorUI(); if (worker == null || (worker != null && !worker.IsAlive)) { if (GUILayout.Button(new GUIContent("Check For Update", EditorHelper.Icon_Check, "Checks for available updates of " + Util.Constants.ASSET_NAME))) { worker = new System.Threading.Thread(() => UpdateCheck.UpdateCheckForEditor(out updateText)); worker.Start(); } } else { GUILayout.Label("Checking... Please wait.", EditorStyles.boldLabel); } Color fgColor = GUI.color; if (updateText.Equals(UpdateCheck.TEXT_NOT_CHECKED)) { GUI.color = Color.cyan; GUILayout.Label(updateText); } else if (updateText.Equals(UpdateCheck.TEXT_NO_UPDATE)) { GUI.color = Color.green; GUILayout.Label(updateText); } else { GUI.color = Color.yellow; GUILayout.Label(updateText); if (GUILayout.Button(new GUIContent("Download", "Visit the 'Unity AssetStore' to download the latest version."))) { Application.OpenURL(Util.Constants.ASSET_URL); } } GUI.color = fgColor; } EditorGUILayout.EndScrollView(); EditorHelper.SeparatorUI(); GUILayout.BeginHorizontal(); { if (GUILayout.Button(new GUIContent("AssetStore", EditorHelper.Logo_Unity, "Visit the 'Unity AssetStore' website."))) { Application.OpenURL(Util.Constants.ASSET_CT_URL); } if (GUILayout.Button(new GUIContent(Util.Constants.ASSET_AUTHOR, EditorHelper.Logo_CT, "Visit the '" + Util.Constants.ASSET_AUTHOR + "' website."))) { Application.OpenURL(Util.Constants.ASSET_AUTHOR_URL); } } GUILayout.EndHorizontal(); GUILayout.Space(6); }