Exemple #1
0
        public static bool ToolWindowsCommonGUI(EditorWindow window)
        {
            if (SkillEditor.Instance == null)
            {
                window.Close();
                return(false);
            }
            if (SkillEditorGUILayout.DoToolWindowsDisabledGUI())
            {
                return(false);
            }
            if (EditorApplication.isCompiling)
            {
                GUI.enabled = false;
            }

            SkillEditorStyles.Init();
            if (Event.current.type == EventType.KeyDown && Event.current.keyCode == KeyCode.F1)
            {
                EditorCommands.ToggleShowHints();
                return(false);
            }
            EditorGUI.indentLevel = 0;
            return(true);
        }
 public void OnGUI()
 {
     if (!SkillEditorStyles.IsInitialized())
     {
         SkillEditorStyles.Init();
     }
     GUILayout.Label(this.titleLabel, EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     this.editField.OnGUI(new GUILayoutOption[0]);
     if (!string.IsNullOrEmpty(this.validationError))
     {
         GUILayout.Box(this.validationError, SkillEditorStyles.ErrorBox, new GUILayoutOption[0]);
     }
     else
     {
         EditorGUI.BeginDisabledGroup(string.IsNullOrEmpty(this.editField.Text));
         if (GUILayout.Button(Strings.get_Label_Create_Variable(), new GUILayoutOption[0]))
         {
             this.editField.CommitEdit();
         }
         EditorGUI.EndDisabledGroup();
     }
     if (Event.get_current().get_type() == 7)
     {
         Color labelTextColor = SkillEditorStyles.LabelTextColor;
         labelTextColor.a = 0.5f;
         Handles.set_color(labelTextColor);
         Handles.DrawPolyLine(this.framePoints);
     }
 }
Exemple #3
0
        private static void DoPlaybackControls()
        {
            Color contentColor = GUI.get_contentColor();

            GUI.set_contentColor((!SkillEditorStyles.UsingProSkin()) ? Color.get_black() : EditorStyles.get_label().get_normal().get_textColor());
            EditorGUI.BeginChangeCheck();
            bool isPlaying = GUILayout.Toggle(EditorApplication.get_isPlayingOrWillChangePlaymode(), SkillEditorContent.Play, EditorStyles.get_toolbarButton(), new GUILayoutOption[]
            {
                GUILayout.MaxWidth(40f)
            });

            if (EditorGUI.EndChangeCheck())
            {
                EditorApplication.set_isPlaying(isPlaying);
            }
            EditorGUI.BeginChangeCheck();
            bool isPaused = GUILayout.Toggle(EditorApplication.get_isPaused(), SkillEditorContent.Pause, EditorStyles.get_toolbarButton(), new GUILayoutOption[]
            {
                GUILayout.MaxWidth(40f)
            });

            if (EditorGUI.EndChangeCheck())
            {
                EditorApplication.set_isPaused(isPaused);
            }
            if (GUILayout.Button(SkillEditorContent.Step, EditorStyles.get_toolbarButton(), new GUILayoutOption[]
            {
                GUILayout.MaxWidth(40f)
            }))
            {
                FsmDebugger.Instance.Step();
                GUIUtility.ExitGUI();
            }
            GUI.set_contentColor(contentColor);
        }
Exemple #4
0
        public override void DoGUI()
        {
            if (SkillEditor.Instance == null)
            {
                base.Close();
                return;
            }
            if (EditorApplication.get_isCompiling())
            {
                GUI.set_enabled(false);
            }
            SkillEditorStyles.Init();
            this.DoToolbar();
            this.scrollPosition = GUILayout.BeginScrollView(this.scrollPosition, new GUILayoutOption[0]);
            if (FsmEditorSettings.ShowHints)
            {
                GUILayout.Box(Strings.get_ActionReportWindow_Description(), SkillEditorStyles.HintBox, new GUILayoutOption[0]);
            }
            switch (FsmEditorSettings.ConsoleActionReportSortOptionIndex)
            {
            case 0:
                this.DoSortedByFSM();
                break;

            case 1:
                this.DoSortedByAction();
                break;
            }
            if (ActionReport.ActionReportList.get_Count() == 0)
            {
                GUILayout.Label(Strings.get_ActionReportWindow_No_warnings_or_errors___(), new GUILayoutOption[0]);
            }
            GUILayout.EndScrollView();
        }
Exemple #5
0
        public override void DoGUI()
        {
            SkillEditorStyles.Init();
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            SkillEditorGUILayout.PlaymakerHeader(this);
            GUI.Label(this.versionLabelRect, VersionInfo.PlayMakerVersionLabel, SkillEditorStyles.RightAlignedLabel);
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            GUILayout.Space(20f);
            GUILayout.FlexibleSpace();
            switch (this.pageNumber)
            {
            case 0:
                WelcomeWindow.Link(SkillEditorStyles.SamplesIcon, Strings.get_WelcomeWindow_Samples(), Strings.get_WelcomeWindow_Samples_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "http://www.hutonggames.com/samples.php");
                WelcomeWindow.Link(SkillEditorStyles.VideoIcon, Strings.get_WelcomeWindow_Tutorials(), Strings.get_WelcomeWindow_Tutorials_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "http://www.hutonggames.com/tutorials.html");
                WelcomeWindow.Link(SkillEditorStyles.DocsIcon, Strings.get_WelcomeWindow_Docs(), Strings.get_WelcomeWindow_Docs_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "https://hutonggames.fogbugz.com/default.asp?W1");
                WelcomeWindow.Link(SkillEditorStyles.ForumIcon, Strings.get_WelcomeWindow_Forums(), Strings.get_WelcomeWindow_Forums_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "http://hutonggames.com/playmakerforum/index.php");
                WelcomeWindow.Link(SkillEditorStyles.AddonsIcon, Strings.get_WelcomeWindow_Addons(), Strings.get_WelcomeWindow_Addons_More(), new WelcomeWindow.LinkFunction(this.GotoPage), 1);
                break;

            case 1:
                WelcomeWindow.Link(SkillEditorStyles.BlackBerryAddonIcon, "BlackBerry Add-On", "NEW! Develop for the new BlackBerry10 platform.", new WelcomeWindow.LinkFunction(this.OpenInAssetStore), "10530");
                WelcomeWindow.Link(SkillEditorStyles.MetroAddonIcon, "Windows Phone 8 Add-On", "NEW! Develop for Windows Phone 8 devices.", new WelcomeWindow.LinkFunction(this.OpenInAssetStore), "10602");
                WelcomeWindow.Link(SkillEditorStyles.MetroAddonIcon, "Windows Store Apps Add-On", "Coming Soon: Develop Windows 8 Store Apps.", new WelcomeWindow.LinkFunction(this.OpenInAssetStore), "http://www.hutonggames.com/store.html");
                if (WelcomeWindow.setupPhoton)
                {
                    WelcomeWindow.Link(SkillEditorStyles.PhotonIcon, Strings.get_WelcomeWindow_Photon_Cloud(), Strings.get_WelcomeWindow_Photon_Cloud_More(), new WelcomeWindow.LinkFunction(this.LaunchPhotonSetupWizard), null);
                }
                else
                {
                    WelcomeWindow.Link(SkillEditorStyles.PhotonIcon, Strings.get_WelcomeWindow_Photon_Cloud(), Strings.get_WelcomeWindow_Photon_Cloud_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "https://hutonggames.fogbugz.com/default.asp?W928");
                }
                WelcomeWindow.Link(SkillEditorStyles.AddonsIcon, "Browse Add-Ons Online", "Find action packs and add-ons for NGUI, 2D Toolkit, Mecanim, Pathfinding, Smooth Moves, Ultimate FPS...", new WelcomeWindow.LinkFunction(this.OpenUrl), "https://hutonggames.fogbugz.com/default.asp?W714");
                break;
            }
            GUILayout.FlexibleSpace();
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            if (this.pageNumber > 0)
            {
                GUILayout.Space(10f);
                if (GUILayout.Button("Back to Welcome Screen", EditorStyles.get_label(), new GUILayoutOption[0]))
                {
                    this.GotoPage(0);
                    GUIUtility.ExitGUI();
                    return;
                }
                EditorGUIUtility.AddCursorRect(GUILayoutUtility.GetLastRect(), 4);
            }
            GUILayout.FlexibleSpace();
            bool flag = GUILayout.Toggle(this.showAtStartup, Strings.get_WelcomeWindow_Show_at_Startup(), new GUILayoutOption[0]);

            if (flag != this.showAtStartup)
            {
                this.showAtStartup = flag;
                EditorPrefs.SetBool(EditorPrefStrings.get_ShowWelcomeScreen(), this.showAtStartup);
            }
            GUILayout.Space(10f);
            GUILayout.EndHorizontal();
            GUILayout.EndVertical();
            GUILayout.EndVertical();
        }
Exemple #6
0
 public override void DoGUI()
 {
     SkillEditorStyles.Init();
     GUILayout.BeginVertical(new GUILayoutOption[0]);
     SkillEditorGUILayout.PlaymakerHeader(this);
     GUILayout.Label(FsmEditorSettings.ProductCopyright, EditorStyles.get_miniLabel(), new GUILayoutOption[0]);
     GUILayout.Label((!EditorApp.IsSourceCodeVersion) ? string.Format(Strings.get_AboutPlaymaker_Version_Info(), VersionInfo.GetAssemblyInformationalVersion()) : "Source Code Version", new GUILayoutOption[0]);
     if (VersionInfo.PlayMakerVersionInfo != "")
     {
         EditorGUILayout.HelpBox(VersionInfo.PlayMakerVersionInfo, 0);
     }
     EditorGUILayout.HelpBox(string.Format(Strings.get_AboutPlaymaker_Special_Thanks(), "Erin Ko, Kemal Amarasingham, Bruce Blumberg, Steve Gargolinski, Lee Hepler, Bart Simon, Lucas Meijer, Joachim Ante, Jaydee Alley, James Murchison, XiaoHang Zheng, Andrzej Łukasik, Vanessa Wesley, Marek Ledvina, Bob Berkebile, Jean Fabre, MaDDoX, gamesonytablet, Marc 'Dreamora' Schaerer, Eugenio 'Ryo567' Martínez, Steven 'Nightreaver' Barthen, Damiangto, VisionaiR3D, 黄峻, Nilton Felicio, Andre Dantas Lima, Ramprasad Madhavan, and the PlayMaker Community!\r\n"), 0);
     if (GUILayout.Button(Strings.get_AboutPlaymaker_Release_Notes(), new GUILayoutOption[0]))
     {
         EditorCommands.OpenWikiPage(WikiPages.ReleaseNotes);
     }
     if (GUILayout.Button(Strings.get_AboutPlaymaker_Hutong_Games_Link(), new GUILayoutOption[0]))
     {
         Application.OpenURL("http://hutonggames.com/");
     }
     GUILayout.Space(5f);
     GUILayout.EndVertical();
     if (!AboutPlaymaker.heightHasBeenSet && Event.get_current().get_type() == 7)
     {
         this.SetWindowHeightToFitContents();
     }
 }
 private void OnGUI()
 {
     if (!SkillEditorStyles.IsInitialized())
     {
         SkillEditorStyles.Init();
     }
     this.editField.OnGUI(new GUILayoutOption[0]);
     this.DoKeyboardGUI();
     this.DoListView();
 }
 public static bool ToolWindowsCommonGUI(EditorWindow window)
 {
     if (SkillEditor.Instance == null)
     {
         window.Close();
         return(false);
     }
     if (SkillEditorGUILayout.DoToolWindowsDisabledGUI())
     {
         return(false);
     }
     if (EditorApplication.get_isCompiling())
     {
         GUI.set_enabled(false);
     }
     SkillEditorStyles.Init();
     if (Event.get_current().get_type() == 4 && Event.get_current().get_keyCode() == 282)
     {
         EditorCommands.ToggleShowHints();
         return(false);
     }
     EditorGUI.set_indentLevel(0);
     return(true);
 }
        private void DoLogLine(SkillLogEntry entry, int index)
        {
            if (!this.EntryIsVisible(entry))
            {
                return;
            }
            if (entry.get_LogType() == 6)
            {
                this.currentState = entry.get_State();
                SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
            }
            if (this.selectedEntry != null && index > this.selectedEntryIndex)
            {
                GUI.set_color(new Color(1f, 1f, 1f, 0.3f));
            }
            if (entry.get_LogType() == 9 || entry.get_LogType() == 10)
            {
                GUI.set_backgroundColor(SkillEditorStyles.DefaultBackgroundColor);
            }
            else
            {
                GUI.set_backgroundColor((this.currentState != null) ? PlayMakerPrefs.get_Colors()[this.currentState.get_ColorIndex()] : Color.get_grey());
            }
            GUILayout.BeginVertical(SkillEditorStyles.LogBackground, new GUILayoutOption[0]);
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            Color backgroundColor = GUI.get_backgroundColor();

            GUI.set_backgroundColor(Color.get_white());
            GUIStyle gUIStyle = SkillEditorStyles.GetLogTypeStyles()[entry.get_LogType()];

            GUILayout.Label("", gUIStyle, new GUILayoutOption[]
            {
                GUILayout.MaxWidth(20f)
            });
            GUI.set_backgroundColor(backgroundColor);
            gUIStyle = SkillEditorStyles.LogLine;
            if (GUILayout.Button(FsmEditorSettings.LogShowTimecode ? entry.get_TextWithTimecode() : entry.get_Text(), gUIStyle, new GUILayoutOption[0]))
            {
                this.SelectLogEntry(entry);
            }
            GUILayout.EndHorizontal();
            if (this.ShowSentBy(entry))
            {
                if (string.IsNullOrEmpty(entry.get_Text2()))
                {
                    entry.set_Text2(Strings.get_FsmLog_Label_Sent_By() + Labels.GetFullStateLabel(entry.get_SentByState()));
                    if (entry.get_Action() != null)
                    {
                        entry.set_Text2(entry.get_Text2() + " : " + Labels.GetActionLabel(entry.get_Action()));
                    }
                }
                if (GUILayout.Button(entry.get_Text2(), SkillEditorStyles.LogLine2, new GUILayoutOption[0]))
                {
                    SkillLogger.OnClickSentBy(entry);
                }
                EditorGUIUtility.AddCursorRect(GUILayoutUtility.GetLastRect(), 4);
            }
            else
            {
                if (this.ShowEventTarget(entry))
                {
                    if (string.IsNullOrEmpty(entry.get_Text2()))
                    {
                        entry.set_Text2(Strings.get_FsmLog_Label_Target() + SkillLogger.GetEventTargetLabel(entry));
                    }
                    if (GUILayout.Button(entry.get_Text2(), SkillEditorStyles.LogLine2, new GUILayoutOption[0]))
                    {
                        this.OnClickEventTarget(entry);
                        GUIUtility.ExitGUI();
                        return;
                    }
                    EditorGUIUtility.AddCursorRect(GUILayoutUtility.GetLastRect(), 4);
                }
                else
                {
                    if (this.ShowHitGameObject(entry))
                    {
                        if (string.IsNullOrEmpty(entry.get_Text2()))
                        {
                            entry.set_Text2("WITH: " + entry.get_GameObjectName());
                            entry.set_GameObjectIcon(EditorHacks.GetIconForObject(entry.get_GameObject()));
                        }
                        if (entry.get_GameObject() != null)
                        {
                            if (GUILayout.Button(entry.get_Text2(), SkillEditorStyles.LogLine2, new GUILayoutOption[0]))
                            {
                                Selection.set_activeGameObject(entry.get_GameObject());
                                GUIUtility.ExitGUI();
                                return;
                            }
                            Rect lastRect = GUILayoutUtility.GetLastRect();
                            EditorGUIUtility.AddCursorRect(lastRect, 4);
                            if (entry.get_GameObjectIcon() != null)
                            {
                                lastRect.Set(lastRect.get_xMin(), lastRect.get_yMin() + 2f, 27f, lastRect.get_height() - 2f);
                                GUI.Label(lastRect, entry.get_GameObjectIcon());
                            }
                        }
                        else
                        {
                            GUILayout.Label(entry.get_Text2() + " (Destroyed)", SkillEditorStyles.LogLine2, new GUILayoutOption[0]);
                        }
                    }
                }
            }
            GUILayout.EndVertical();
            if (entry == this.selectedEntry)
            {
                this.beforeSelected = this.prevEntry;
                GUI.set_backgroundColor(Color.get_white());
                GUILayout.Box(GUIContent.none, SkillEditorStyles.LogLineTimeline, new GUILayoutOption[0]);
            }
            if (this.prevEntry == this.selectedEntry)
            {
                this.afterSelected = entry;
            }
            this.prevEntry = entry;
            this.numEntriesDrawn++;
        }
 public override void DoGUI()
 {
     SkillEditorStyles.Init();
     SkillEditorGUILayout.ToolWindowLargeTitle(this, Strings.get_CustomActionWizard_Full_Title());
     SkillEditorGUILayout.LabelWidth(200f);
     this.HandleDragPreviewDivider();
     this.controlsScrollPosition = EditorGUILayout.BeginScrollView(this.controlsScrollPosition, new GUILayoutOption[0]);
     EditorGUI.set_indentLevel(1);
     CustomActionWizard.ControlGroup(Strings.get_CustomActionWizard_Group_Name_and_Description());
     this.actionName = SkillEditorGUILayout.TextFieldWithHint(this.actionName, Strings.get_CustomActionWizard_Label_Action_Name(), new GUILayoutOption[0]);
     this.tooltip    = SkillEditorGUILayout.TextAreaWithHint(this.tooltip, Strings.get_CustomActionWizard_Label_Description(), new GUILayoutOption[]
     {
         GUILayout.Height(80f)
     });
     CustomActionWizard.ControlGroup(Strings.get_CustomActionWizard_Group_Category());
     GUI.set_enabled(string.IsNullOrEmpty(this.customCategory));
     this.selectedCategory = EditorGUILayout.Popup(Strings.get_CustomActionWizard_Select_Category(), this.selectedCategory, this.actionCategories, new GUILayoutOption[0]);
     GUI.set_enabled(true);
     this.customCategory = EditorGUILayout.TextField(Strings.get_CustomActionWizard_Custom_Category(), this.customCategory, new GUILayoutOption[0]);
     CustomActionWizard.ControlGroup(Strings.get_CustomActionWizard_Generated_Code_Folder());
     this.rootFolder = EditorGUILayout.TextField(Strings.get_CustomActionWizard_Root_Folder(), this.rootFolder, new GUILayoutOption[0]);
     GUI.set_enabled(!this.folderSameAsCategory);
     this.actionFolder = EditorGUILayout.TextField(Strings.get_CustomActionWizard_Action_Folder(), this.actionFolder, new GUILayoutOption[0]);
     GUI.set_enabled(true);
     this.folderSameAsCategory = EditorGUILayout.Toggle(Strings.get_CustomActionWizard_Same_as_Category(), this.folderSameAsCategory, new GUILayoutOption[0]);
     CustomActionWizard.ControlGroup(Strings.get_CustomActionWizard_Add_Methods());
     this.handlesOnEnter        = EditorGUILayout.Toggle("OnEnter", this.handlesOnEnter, new GUILayoutOption[0]);
     this.handlesOnUpdate       = EditorGUILayout.Toggle("OnUpdate", this.handlesOnUpdate, new GUILayoutOption[0]);
     this.handlesOnFixedUpdate  = EditorGUILayout.Toggle("OnFixedUpdate", this.handlesOnFixedUpdate, new GUILayoutOption[0]);
     this.handlesOnLateUpdate   = EditorGUILayout.Toggle("OnLateUpdate", this.handlesOnLateUpdate, new GUILayoutOption[0]);
     this.handlesOnExit         = EditorGUILayout.Toggle("OnExit", this.handlesOnExit, new GUILayoutOption[0]);
     this.hasCustomErrorChecker = EditorGUILayout.Toggle(Strings.get_CustomActionWizard_Custom_Error_Checker(), this.hasCustomErrorChecker, new GUILayoutOption[0]);
     EditorGUILayout.EndScrollView();
     if (!this.isValid)
     {
         SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
         EditorGUI.set_indentLevel(0);
         EditorGUILayout.HelpBox(this.errorString, 3, true);
     }
     GUILayout.BeginHorizontal(EditorStyles.get_toolbar(), new GUILayoutOption[0]);
     GUILayout.Label(Strings.get_CustomActionWizard_Code_Preview(), new GUILayoutOption[0]);
     GUILayout.FlexibleSpace();
     GUILayout.EndHorizontal();
     if (Event.get_current().get_type() == 7)
     {
         this.previewDividerRect = GUILayoutUtility.GetLastRect();
     }
     EditorGUIUtility.AddCursorRect(this.previewDividerRect, 2);
     this.previewScrollPosition = EditorGUILayout.BeginScrollView(this.previewScrollPosition, new GUILayoutOption[]
     {
         GUILayout.MinHeight(this.previewHeight)
     });
     GUILayout.Label(this.code, new GUILayoutOption[0]);
     EditorGUILayout.EndScrollView();
     SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
     GUILayout.Label(Strings.get_CustomActionWizard_File_Path_Prefix() + this.localAssetFilename, new GUILayoutOption[0]);
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     GUI.set_enabled(this.isValid);
     if (GUILayout.Button(Strings.get_CustomActionWizard_Save_Button(), new GUILayoutOption[0]))
     {
         this.SaveCustomAction();
         GUIUtility.ExitGUI();
         return;
     }
     GUI.set_enabled(true);
     if (GUILayout.Button(new GUIContent(Strings.get_CustomActionWizard_Find_File(), Strings.get_CustomActionWizard_Find_File_Tooltip()), new GUILayoutOption[]
     {
         GUILayout.MaxWidth(100f)
     }))
     {
         this.PingScriptFile();
     }
     if (GUILayout.Button(new GUIContent(Strings.get_CustomActionWizard_Copy_Code(), Strings.get_CustomActionWizard_Copy_Code_Tooltip()), new GUILayoutOption[]
     {
         GUILayout.MaxWidth(100f)
     }))
     {
         this.CopyCodeToClipboard();
     }
     GUILayout.EndHorizontal();
     GUILayout.Space(10f);
     EditorGUI.set_indentLevel(0);
     if (GUI.get_changed())
     {
         this.UpdateGUI();
         GUIUtility.ExitGUI();
     }
 }
Exemple #11
0
 public override void DoGUI()
 {
     SkillEditorStyles.Init();
     SkillEditorGUILayout.ToolWindowLargeTitle(this, Strings.get_BugReportWindow_Title());
     SkillEditorGUILayout.LabelWidth(200f);
     this.controlsScrollPosition = EditorGUILayout.BeginScrollView(this.controlsScrollPosition, new GUILayoutOption[0]);
     GUILayout.Label(Strings.get_BugReportWindow_Bug_Title_Label(), EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     this.description = EditorGUILayout.TextField(this.description, new GUILayoutOption[0]);
     GUILayout.Label(Strings.get_BugReportWindow_Bug_Description_Label(), EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     this.extra = EditorGUILayout.TextArea(this.extra, SkillEditorStyles.TextAreaWithWordWrap, new GUILayoutOption[]
     {
         GUILayout.ExpandHeight(true)
     });
     this.area           = (BugReportWindow.ScoutArea)EditorGUILayout.EnumPopup(Strings.get_BugReportWindow_Where_does_it_happen(), this.area, new GUILayoutOption[0]);
     this.frequencyIndex = EditorGUILayout.Popup(Strings.get_BugReportWindow_How_often_does_it_happen(), this.frequencyIndex, BugReportWindow.frequencyChoices, new GUILayoutOption[0]);
     this.email          = EditorGUILayout.TextField(new GUIContent(Strings.get_BugReportWindow_Your_E_mail(), Strings.get_BugReportWindow_Your_E_mail_Tooltip()), this.email, new GUILayoutOption[0]);
     EditorGUILayout.EndScrollView();
     SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     GUILayout.Label("PlayMaker: " + VersionInfo.AssemblyVersion, new GUILayoutOption[0]);
     GUILayout.Label("Unity: " + Application.get_unityVersion(), new GUILayoutOption[0]);
     GUILayout.Label("Build Target: " + EditorUserBuildSettings.get_activeBuildTarget(), new GUILayoutOption[0]);
     GUILayout.FlexibleSpace();
     GUILayout.EndHorizontal();
     SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     if (GUILayout.Button(Strings.get_BugReportWindow_Submit_Button(), new GUILayoutOption[0]))
     {
         if (!this.isValid)
         {
             EditorUtility.DisplayDialog(Strings.get_BugReportWindow_Title(), this.errorString, Strings.get_OK());
         }
         else
         {
             this.SubmitBugReportByMail();
         }
         GUIUtility.ExitGUI();
         return;
     }
     if (GUILayout.Button(new GUIContent(Strings.get_Command_Copy(), Strings.get_BugReportWindow_Copy_Tooltip()), new GUILayoutOption[]
     {
         GUILayout.MaxWidth(100f)
     }))
     {
         this.CopyReportToClipboard();
     }
     if (GUILayout.Button(new GUIContent(Strings.get_Command_Reset()), new GUILayoutOption[]
     {
         GUILayout.MaxWidth(100f)
     }))
     {
         GUIUtility.set_keyboardControl(0);
         this.Reset();
     }
     GUILayout.EndHorizontal();
     GUILayout.Space(10f);
     if (GUI.get_changed())
     {
         this.UpdateGUI();
         GUIUtility.ExitGUI();
     }
 }
Exemple #12
0
 public override void DoGUI()
 {
     SkillEditorStyles.Init();
     SkillEditorGUILayout.ToolWindowLargeTitle(this, "Doc Helpers");
     if (SkillEditor.Instance == null)
     {
         GUILayout.Label("Please open the PlayMaker Editor...", new GUILayoutOption[0]);
         return;
     }
     if (!this.capturingGUI)
     {
         EditorGUILayout.HelpBox("This tool generates the screenshots and html required to document actions in the online wiki.", 1);
         GUILayout.Label("Source", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
         this.selectedCategory = EditorGUILayout.Popup("Action Category", this.selectedCategory, this.categoryChoices, new GUILayoutOption[0]);
         SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
         GUILayout.Label("Export Settings", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
         this.screenshotsSavePath = EditorGUILayout.TextField("Save Screenshots", this.screenshotsSavePath, new GUILayoutOption[0]);
         this.htmlSavePath        = EditorGUILayout.TextField("Save Html", this.htmlSavePath, new GUILayoutOption[0]);
         this.imagesUrl           = EditorGUILayout.TextField("Images Url", this.imagesUrl, new GUILayoutOption[0]);
         SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
         if (GUILayout.Button("Capture Screenshots", new GUILayoutOption[]
         {
             GUILayout.MinHeight(30f)
         }))
         {
             this.StartCaptureActionScreenshots();
         }
         if (GUILayout.Button("Generate Wiki Html", new GUILayoutOption[]
         {
             GUILayout.MinHeight(30f)
         }))
         {
             this.GenerateActionWikiHtml();
             this.GenerateActionsEnum();
         }
         SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
         if (GUI.get_changed())
         {
             this.SavePreferences();
         }
         GUILayout.FlexibleSpace();
         GUILayout.Label("Resize window height to fit largest action screenshot...", new GUILayoutOption[0]);
     }
     else
     {
         ActionEditor.PreviewMode = true;
         if (this.previewAction != null)
         {
             SkillEditorGUILayout.LabelWidth(150f);
             EditorGUILayout.Space();
             EditorGUILayout.BeginVertical(new GUILayoutOption[0]);
             SkillEditor.ActionEditor.OnGUI(this.previewAction);
             EditorGUILayout.EndVertical();
             if (Event.get_current().get_type() == 7)
             {
                 this.SaveActionScreenshot();
                 this.NextActionScreenshot();
             }
             GUILayout.FlexibleSpace();
             if (this.capturingGUI)
             {
                 EditorUtility.DisplayProgressBar("Saving Action Screenshots...", "Press Escape to cancel", (float)this.actionIndex / (float)Actions.List.get_Count());
             }
         }
     }
     ActionEditor.PreviewMode = false;
 }