From b82da95b5181ac8bbae38efb13e950d5e88a4caa Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 23 Oct 2020 13:08:43 +0800 Subject: =?UTF-8?q?*=E7=A7=BB=E5=8A=A8amplify=20shader=20editor=E5=88=B0th?= =?UTF-8?q?ird=20party=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Plugins/Editor/Version/About.cs | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Assets/ThirdParty/AmplifyShaderEditor/Plugins/Editor/Version/About.cs (limited to 'Assets/ThirdParty/AmplifyShaderEditor/Plugins/Editor/Version/About.cs') diff --git a/Assets/ThirdParty/AmplifyShaderEditor/Plugins/Editor/Version/About.cs b/Assets/ThirdParty/AmplifyShaderEditor/Plugins/Editor/Version/About.cs new file mode 100644 index 00000000..a1477515 --- /dev/null +++ b/Assets/ThirdParty/AmplifyShaderEditor/Plugins/Editor/Version/About.cs @@ -0,0 +1,66 @@ +// Amplify Shader Editor - Visual Shader Editing Tool +// Copyright (c) Amplify Creations, Lda + +using UnityEngine; +using UnityEditor; + +namespace AmplifyShaderEditor +{ + public class About : EditorWindow + { + private const string AboutImageGUID = "8aba6bb20faf8824d9d81946542f1ce1"; + private Vector2 m_scrollPosition = Vector2.zero; + private Texture2D m_aboutImage; + + [MenuItem( "Window/Amplify Shader Editor/About...", false, 2001 )] + static void Init() + { + About window = (About)GetWindow( typeof( About ), true, "About Amplify Shader Editor" ); + window.minSize = new Vector2( 502, 290 ); + window.maxSize = new Vector2( 502, 290 ); + window.Show(); + } + + [MenuItem( "Window/Amplify Shader Editor/Manual", false, 2000 )] + static void OpenManual() + { + Application.OpenURL( "http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Manual" ); + } + + private void OnEnable() + { + m_aboutImage = AssetDatabase.LoadAssetAtPath( AssetDatabase.GUIDToAssetPath( AboutImageGUID ) ); + } + + public void OnGUI() + { + m_scrollPosition = GUILayout.BeginScrollView( m_scrollPosition ); + + GUILayout.BeginVertical(); + + GUILayout.Space( 10 ); + + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + GUILayout.Box( m_aboutImage, GUIStyle.none ); + + if( Event.current.type == EventType.MouseUp && GUILayoutUtility.GetLastRect().Contains( Event.current.mousePosition ) ) + Application.OpenURL( "http://www.amplify.pt" ); + + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + + GUIStyle labelStyle = new GUIStyle( EditorStyles.label ); + labelStyle.alignment = TextAnchor.MiddleCenter; + labelStyle.wordWrap = true; + + GUILayout.Label( "\nAmplify Shader Editor " + VersionInfo.StaticToString(), labelStyle, GUILayout.ExpandWidth( true ) ); + + GUILayout.Label( "\nCopyright (c) Amplify Creations, Lda. All rights reserved.\n", labelStyle, GUILayout.ExpandWidth( true ) ); + + GUILayout.EndVertical(); + + GUILayout.EndScrollView(); + } + } +} -- cgit v1.1-26-g67d0