public void OnGUI() { AboutWindow.LoadLogos(); GUILayout.Space(10f); GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.Space(5f); GUILayout.BeginVertical(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); GUILayout.Label(AboutWindow.s_Header, GUIStyle.none, new GUILayoutOption[0]); this.ListenForSecretCodes(); string text = ""; if (InternalEditorUtility.HasFreeLicense()) { text = " Personal"; } if (InternalEditorUtility.HasEduLicense()) { text = " Edu"; } GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.Space(52f); string text2 = this.FormatExtensionVersionString(); this.m_ShowDetailedVersion |= Event.current.alt; if (this.m_ShowDetailedVersion) { int unityVersionDate = InternalEditorUtility.GetUnityVersionDate(); DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0); string unityBuildBranch = InternalEditorUtility.GetUnityBuildBranch(); string text3 = ""; if (unityBuildBranch.Length > 0) { text3 = "Branch: " + unityBuildBranch; } EditorGUILayout.SelectableLabel(string.Format("Version {0}{1}{2}\n{3:r}\n{4}", new object[] { InternalEditorUtility.GetFullUnityVersion(), text, text2, dateTime.AddSeconds((double)unityVersionDate), text3 }), new GUILayoutOption[] { GUILayout.Width(550f), GUILayout.Height(42f) }); this.m_TextInitialYPos = 108f; } else { GUILayout.Label(string.Format("Version {0}{1}{2}", Application.unityVersion, text, text2), new GUILayoutOption[0]); } if (Event.current.type != EventType.ValidateCommand) { GUILayout.EndHorizontal(); GUILayout.Space(4f); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); float creditsWidth = base.position.width - 10f; float num = this.m_TextYPos; Rect rect = GUILayoutUtility.GetRect(10f, this.m_TextInitialYPos); GUI.BeginGroup(rect); string[] array = AboutWindowNames.Names(null, true); for (int i = 0; i < array.Length; i++) { string nameChunk = array[i]; num = AboutWindow.DoCreditsNameChunk(nameChunk, creditsWidth, num); } num = AboutWindow.DoCreditsNameChunk("Thanks to Forest 'Yoggy' Johnson, Graham McAllister, David Janik-Jones, Raimund Schumacher, Alan J. Dickins and Emil 'Humus' Persson", creditsWidth, num); this.m_TotalCreditsHeight = num - this.m_TextYPos; GUI.EndGroup(); this.HandleScrollEvents(rect); GUILayout.FlexibleSpace(); GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.Label(AboutWindow.s_MonoLogo, new GUILayoutOption[0]); GUILayout.Label("Scripting powered by The Mono Project.\n\n(c) 2011 Novell, Inc.", "MiniLabel", new GUILayoutOption[] { GUILayout.Width(200f) }); GUILayout.Label(AboutWindow.s_AgeiaLogo, new GUILayoutOption[0]); GUILayout.Label("Physics powered by PhysX.\n\n(c) 2011 NVIDIA Corporation.", "MiniLabel", new GUILayoutOption[] { GUILayout.Width(200f) }); GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.Space(5f); GUILayout.BeginVertical(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); string aboutWindowLabel = UnityVSSupport.GetAboutWindowLabel(); if (aboutWindowLabel.Length > 0) { GUILayout.Label(aboutWindowLabel, "MiniLabel", new GUILayoutOption[0]); } GUILayout.Label(InternalEditorUtility.GetUnityCopyright(), "MiniLabel", new GUILayoutOption[0]); GUILayout.EndVertical(); GUILayout.Space(10f); GUILayout.FlexibleSpace(); GUILayout.BeginVertical(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); GUILayout.Label(InternalEditorUtility.GetLicenseInfo(), "AboutWindowLicenseLabel", new GUILayoutOption[0]); GUILayout.EndVertical(); GUILayout.Space(5f); GUILayout.EndHorizontal(); GUILayout.Space(5f); } }
public void OnGUI() { LoadLogos(); GUILayout.Space(10); GUILayout.BeginHorizontal(); GUILayout.Space(5); GUILayout.BeginVertical(); GUILayout.FlexibleSpace(); GUILayout.Label(s_Header, GUIStyle.none); ListenForSecretCodes(); var licenseTypeString = ""; if (InternalEditorUtility.HasFreeLicense()) { licenseTypeString = " Personal"; } if (InternalEditorUtility.HasEduLicense()) { licenseTypeString = " Edu"; } GUILayout.BeginHorizontal(); GUILayout.Space(52f); // Ident version information string extensionVersion = FormatExtensionVersionString(); m_ShowDetailedVersion |= Event.current.alt; if (m_ShowDetailedVersion) { int t = InternalEditorUtility.GetUnityVersionDate(); DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0, 0); string branch = InternalEditorUtility.GetUnityBuildBranch(); string branchString = ""; if (branch.Length > 0) { branchString = "Branch: " + branch; } EditorGUILayout.SelectableLabel( string.Format("Version {0}{1}{2}\n{3:r}\n{4}", InternalEditorUtility.GetFullUnityVersion(), licenseTypeString, extensionVersion, dt.AddSeconds(t), branchString), GUILayout.Width(550), GUILayout.Height(42)); m_TextInitialYPos = 120 - 12; } else { GUILayout.Label(string.Format("Version {0}{1}{2}", Application.unityVersion, licenseTypeString, extensionVersion)); } if (Event.current.type == EventType.ValidateCommand) { return; } GUILayout.EndHorizontal(); GUILayout.Space(4); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); float creditsWidth = position.width - 10; float chunkOffset = m_TextYPos; Rect scrollAreaRect = GUILayoutUtility.GetRect(10, m_TextInitialYPos); GUI.BeginGroup(scrollAreaRect); foreach (string nameChunk in AboutWindowNames.Names(null, true)) { chunkOffset = DoCreditsNameChunk(nameChunk, creditsWidth, chunkOffset); } chunkOffset = DoCreditsNameChunk(kSpecialThanksNames, creditsWidth, chunkOffset); m_TotalCreditsHeight = chunkOffset - m_TextYPos; GUI.EndGroup(); HandleScrollEvents(scrollAreaRect); GUILayout.FlexibleSpace(); GUILayout.BeginHorizontal(); GUILayout.Label(s_MonoLogo); GUILayout.Label("Scripting powered by The Mono Project.\n\n(c) 2011 Novell, Inc.", "MiniLabel", GUILayout.Width(200)); GUILayout.Label(s_AgeiaLogo); GUILayout.Label("Physics powered by PhysX.\n\n(c) 2011 NVIDIA Corporation.", "MiniLabel", GUILayout.Width(200)); GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); GUILayout.BeginHorizontal(); GUILayout.Space(5); GUILayout.BeginVertical(); GUILayout.FlexibleSpace(); var VSTUlabel = UnityVSSupport.GetAboutWindowLabel(); if (VSTUlabel.Length > 0) { GUILayout.Label(VSTUlabel, "MiniLabel"); } GUILayout.Label(InternalEditorUtility.GetUnityCopyright(), "MiniLabel"); GUILayout.EndVertical(); GUILayout.Space(10); GUILayout.FlexibleSpace(); GUILayout.BeginVertical(); GUILayout.FlexibleSpace(); GUILayout.Label(InternalEditorUtility.GetLicenseInfo(), "AboutWindowLicenseLabel"); GUILayout.EndVertical(); GUILayout.Space(5); GUILayout.EndHorizontal(); GUILayout.Space(5); }
public void OnGUI() { var evt = Event.current; var mainLayoutWidth = position.width - Styles.mainLayout.margin.horizontal; using (new GUILayout.VerticalScope(Styles.mainLayout)) { GUILayout.Label(Styles.HeaderLogo, Styles.HeaderLayout); using (new GUILayout.HorizontalScope(Styles.versionLayout)) { ListenForSecretCodes(); string extensionVersion = FormatExtensionVersionString(); m_ShowDetailedVersion |= evt.alt; if (m_ShowDetailedVersion) { int t = InternalEditorUtility.GetUnityVersionDate(); DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0, 0); string branch = InternalEditorUtility.GetUnityBuildBranch(); EditorGUILayout.SelectableLabel( string.Format("{0}{1}\nRevision: {2} {3}\nBuilt: {4:r}", InternalEditorUtility.GetUnityDisplayVersionVerbose(), extensionVersion, branch, InternalEditorUtility.GetUnityBuildHash(), dt.AddSeconds(t)), Styles.versionStyle, GUILayout.MaxWidth(mainLayoutWidth), GUILayout.Height(38f)); } else { GUILayout.Label(string.Format("{0}{1}", InternalEditorUtility.GetUnityDisplayVersion(), extensionVersion), Styles.versionStyle); } if (evt.type == EventType.ValidateCommand) { return; } } using (new GUILayout.HorizontalScope(Styles.creditsLayout)) { float chunkOffset = m_TextYPos; Rect scrollAreaRect = GUILayoutUtility.GetRect(0, mainLayoutWidth, 75f, position.height, GUILayout.ExpandHeight(true)); GUI.BeginGroup(scrollAreaRect); foreach (string nameChunk in AboutWindowNames.Names(null, true)) { chunkOffset = DoCreditsNameChunk(nameChunk, mainLayoutWidth, chunkOffset); } chunkOffset = DoCreditsNameChunk(kSpecialThanksNames, mainLayoutWidth, chunkOffset); m_TotalCreditsHeight = chunkOffset - m_TextYPos; GUI.EndGroup(); HandleScrollEvents(evt, scrollAreaRect); } using (new GUILayout.HorizontalScope(Styles.poweredLayout)) { var poweredBySectionMaxWidth = (mainLayoutWidth - Styles.poweredSectionLayout.margin.horizontal * 2) / 2f; using (new GUILayout.VerticalScope(Styles.poweredSectionLayout, GUILayout.MaxWidth(poweredBySectionMaxWidth))) { GUILayout.Label("Scripting powered by The Mono Project.\n\u00A9 2011 Novell, Inc.", Styles.aboutWindowLicenseLabel); GUILayout.FlexibleSpace(); GUILayout.Label(Styles.MonoLogo, Styles.MonoLogoLayout); GUILayout.FlexibleSpace(); if (!InternalEditorUtility.IsUnityBeta()) { var specialThanksRect = GUILayoutUtility.GetRect(Styles.thanksContent, Styles.thanksStyle); if (GUI.Button(specialThanksRect, Styles.thanksContent, Styles.thanksStyle)) { Process.Start(Styles.thanksUri.AbsoluteUri); } EditorGUIUtility.AddCursorRect(specialThanksRect, MouseCursor.Link); } GUILayout.Label(InternalEditorUtility.GetUnityCopyright().Replace("(c)", "\u00A9"), Styles.aboutWindowLicenseLabel); } GUILayout.FlexibleSpace(); using (new GUILayout.VerticalScope(Styles.poweredSectionLayout, GUILayout.MaxWidth(poweredBySectionMaxWidth))) { GUILayout.Label("Physics powered by PhysX.\n\u00A9 2019 NVIDIA Corporation.", Styles.aboutWindowLicenseLabel); GUILayout.FlexibleSpace(); GUILayout.Label(Styles.AgeiaLogo, Styles.AgeiaLogoLayout); GUILayout.FlexibleSpace(); GUILayout.Label(InternalEditorUtility.GetLicenseInfo().Replace("(c)", "\u00A9"), Styles.aboutWindowLicenseLabel); } } } }