private void OnGUI() { if (!inited) { Init(); } GUI.Box(new Rect(0, 0, 500, 58), "v" + OnlineMaps.version, headerStyle); GUILayoutUtility.GetRect(position.width, 60); scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); EditorGUILayout.Space(); if (DrawButton(wizardTexture, "Map Wizard", "Create your own map for a minute.")) { OnlineMapsWizard.OpenWindow(); } if (DrawButton(boltTexture, "Import Bolt Integration Kit", "and interact with the map without C# scripting.")) { OnlineMapsPackageManager.ImportBoltIntegrationKit(); } if (DrawButton(playmakerTexture, "Import Playmaker Integration Kit", "and interact with the map without C# scripting.")) { OnlineMapsPackageManager.ImportPlayMakerIntegrationKit(); } if (DrawButton(docTexture, "Documentation", "Online version of the documentation.")) { Process.Start("http://infinity-code.com/en/docs/online-maps"); } if (DrawButton(apiTexture, "API Reference", "Online Maps API Reference.")) { Process.Start("http://infinity-code.com/en/docs/api/online-maps"); } if (DrawButton(examplesTexture, "Atlas of Examples", "We made a lot of examples. That will help you get started quickly.")) { Process.Start("http://infinity-code.com/atlas/online-maps"); } if (DrawButton(supportTexture, "Support", "If you have any problems feel free to contact us.")) { Process.Start("mailto:[email protected]?subject=Online maps"); } if (DrawButton(forumTexture, "Forum", "Official forum of Online Maps.")) { Process.Start("http://forum.infinity-code.com"); } if (DrawButton(rateTexture, "Rate and Review", "Share your impression about the asset.")) { RateAndReview(); } if (DrawButton(updateTexture, "Check Updates", "Perhaps a new version is already waiting for you. Check it.")) { OnlineMapsUpdater.OpenWindow(); } EditorGUILayout.EndScrollView(); EditorGUILayout.LabelField(copyright, copyrightStyle); }
private void DrawToolbarGUI() { GUILayout.BeginHorizontal(EditorStyles.toolbar); if (OnlineMapsUpdater.hasNewVersion && updateAvailableContent != null) { Color defBackgroundColor = GUI.backgroundColor; GUI.backgroundColor = new Color(1, 0.5f, 0.5f); if (GUILayout.Button(updateAvailableContent, EditorStyles.toolbarButton)) { OnlineMapsUpdater.OpenWindow(); } GUI.backgroundColor = defBackgroundColor; } else { GUILayout.Label(""); } if (GUILayout.Button("Help", EditorStyles.toolbarButton, GUILayout.ExpandWidth(false))) { GenericMenu menu = new GenericMenu(); menu.AddItem(new GUIContent("Documentation"), false, OnViewDocs); menu.AddItem(new GUIContent("API Reference"), false, OnViewAPI); menu.AddItem(new GUIContent("Atlas of Examples"), false, OnViewAtlas); menu.AddSeparator(""); menu.AddItem(new GUIContent("Product Page"), false, OnProductPage); menu.AddItem(new GUIContent("Forum"), false, OnViewForum); menu.AddItem(new GUIContent("Check Updates"), false, OnCheckUpdates); menu.AddItem(new GUIContent("Support"), false, OnSendMail); menu.AddSeparator(""); menu.AddItem(new GUIContent("Rate and Review"), false, OnlineMapsWelcome.RateAndReview); menu.AddItem(new GUIContent("About"), false, OnAbout); menu.ShowAsContext(); } GUILayout.EndHorizontal(); }
private void OnCheckUpdates() { OnlineMapsUpdater.OpenWindow(); }