void OnGUI() { if (s_Logo == null) { s_Logo = new GUIContent(Resources.Load("camerashake_logo") as Texture); s_HorizontalScrollbarStyle = new GUIStyle(GUI.skin.horizontalScrollbar); s_VerticalScrollbarStyle = new GUIStyle(GUI.skin.verticalScrollbar); s_HorizontalScrollbarStyle.fixedWidth = 0; s_HorizontalScrollbarStyle.fixedHeight = 0; s_VerticalScrollbarStyle.fixedWidth = 0; s_VerticalScrollbarStyle.fixedHeight = 0; } GUILayout.BeginHorizontal(GUILayout.Height(128)); GUILayout.Label(s_Logo); GUILayout.FlexibleSpace(); GUILayout.BeginVertical(); GUILayout.FlexibleSpace(); GUILayout.Label("Camera Shake", EditorStyles.largeLabel); GUILayout.Label("Version " + VersionInfo.version, EditorStyles.miniLabel); if (VersionInfo.isBeta) { GUILayout.Label("Beta Release", EditorStyles.miniLabel); } GUILayout.FlexibleSpace(); GUILayout.EndVertical(); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition, false, false, s_HorizontalScrollbarStyle, s_VerticalScrollbarStyle, GUILayout.Height(40)); CreditsLabel(""); CreditsLabel(""); CreditsLabel("Developed by Josh Montoute"); CreditsLabel( "Special thanks to:\n" + "Alpha and Beta Testers (you guys rock!)\n" + "" ); CreditsLabel(""); CreditsLabel("Uses the DotNetZip library: http://dotnetzip.codeplex.com"); CreditsLabel(""); CreditsLabel(""); CreditsLabel(""); CreditsLabel(""); GUILayout.EndScrollView(); string contentLink = VersionInfo.ContentLink(); if (!VersionInfo.isBeta && !string.IsNullOrEmpty(contentLink)) { if (GUILayout.Button("Sign up for update notifications")) { CameraShakeMenuItems.RegisterCameraShake(); } if (GUILayout.Button("Rate this package! (Unity Asset Store)")) { Application.OpenURL("com.unity3d.kharma:" + contentLink); } } GUI.color = new Color(0, .5f, .75f, 1); if (GUILayout.Button("https://www.thinksquirrel.com/", EditorStyles.whiteLabel)) { Application.OpenURL("https://www.thinksquirrel.com/"); } GUI.color = Color.white; GUILayout.Label("License: " + VersionInfo.license); GUILayout.Label(VersionInfo.copyright, EditorStyles.miniLabel); GUILayout.Space(14); minSize = s_MinSize; maxSize = s_MaxSize; }
void OnGUI() { if (s_Logo == null) { s_Logo = new GUIContent(Resources.Load("camerashake_logo") as Texture); } GUILayout.BeginVertical(); // Logo GUILayout.BeginHorizontal(GUILayout.Height(128)); GUILayout.FlexibleSpace(); GUILayout.Label(s_Logo); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); // Welcome message GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label("Thank you for installing Camera Shake!", EditorStyles.largeLabel); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.BeginVertical(); GUILayout.Label("Please check out the following links for more information."); GUILayout.Label("This window can be re-opened from Preferences > Camera Shake."); GUILayout.EndVertical(); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.BeginVertical(); // Links if (DrawButton("Help", "Browse through the Reference Manual.")) { CameraShakeMenuItems.HelpWindow(); } if (DrawButton("Support Forum", "Open the Camera Shake support forum.")) { CameraShakeMenuItems.SupportForumWindow(); } EditorGUILayout.Separator(); EditorGUILayout.Separator(); if (DrawButton("About Camera Shake", "More information about Camera Shake.")) { AboutCameraShake.Open(); } string contentLink = VersionInfo.ContentLink(); bool e = GUI.enabled; GUI.enabled = e && !VersionInfo.isBeta && !string.IsNullOrEmpty(contentLink); if (DrawButton("Rate this package", "Rate this package in the Asset Store.")) { Application.OpenURL("com.unity3d.kharma:" + contentLink); } GUI.enabled = e; if (DrawButton("Download Help Files", "Automatically download help files from the web.")) { CameraShakePreferences.DownloadDocumentation(true); } EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); // Close window GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Close this Window", GUILayout.Width(175))) { Close(); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); // Version info GUILayout.Label("Camera Shake Version: " + VersionInfo.version); GUILayout.Label("Platform: Unity " + Application.unityVersion); GUILayout.Label("License: " + VersionInfo.license); GUILayout.EndVertical(); // TODO: T.P.R }