Beispiel #1
0
        public void BuildFsmVariableList(bool keepSelection = true)
        {
            if (this.target == null)
            {
                return;
            }
            string name = "";

            if (this.selectedFsmVariable != null)
            {
                name = this.selectedFsmVariable.Name;
            }
            this.fsmVariables = SkillVariable.GetFsmVariableList(this.owner);
            this.SortVariableList();
            this.listIsDirty = false;
            this.categoryLabels.Clear();
            while (this.categoryLabels.get_Count() < this.target.get_Categories().Length)
            {
                string        text          = this.target.get_Categories()[this.categoryLabels.get_Count()];
                EditableLabel editableLabel = new EditableLabel(this.window, text)
                {
                    ID           = this.categoryLabels.get_Count(),
                    EditCommited = new EditableLabel.EditCommitedCallback(this.CommitCategoryEdit),
                    ContextClick = new EditableLabel.ContextClickCallback(this.DoCategoryContextMenu),
                    Style        = EditorStyles.get_boldLabel()
                };
                this.categoryLabels.Add(editableLabel);
            }
            if (keepSelection && this.categoryTextField != null)
            {
                this.SelectVariable(name);
            }
            this.BuildFilteredList();
        }
 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);
     }
 }
Beispiel #3
0
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     Object[] targets = base.get_targets();
     for (int i = 0; i < targets.Length; i++)
     {
         Object     @object    = targets[i];
         GroupTrack groupTrack = @object as GroupTrack;
         if (groupTrack == null)
         {
             break;
         }
         List <TrackAsset> subTracks = groupTrack.subTracks;
         string            name      = groupTrack.get_name();
         GUILayout.Label((subTracks.Count <= 0) ? name : string.Concat(new object[]
         {
             name,
             " (",
             subTracks.Count,
             ")"
         }), EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
         GUILayout.Space(3f);
         this.m_SubTracks.set_list(groupTrack.subTracks);
         this.m_SubTracks.DoLayoutList();
         this.m_SubTracks.set_index(-1);
     }
 }
Beispiel #4
0
 public void DebugGUI()
 {
     GUILayout.Label("Back List: ", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     using (List <SkillSelectionHistory.HistoryItem> .Enumerator enumerator = this.backList.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             SkillSelectionHistory.HistoryItem current = enumerator.get_Current();
             GUILayout.Label(Labels.GetFullFsmLabelWithInstanceID(current.fsm), new GUILayoutOption[0]);
         }
     }
     GUILayout.Label("Forward List: ", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     using (List <SkillSelectionHistory.HistoryItem> .Enumerator enumerator2 = this.forwardList.GetEnumerator())
     {
         while (enumerator2.MoveNext())
         {
             SkillSelectionHistory.HistoryItem current2 = enumerator2.get_Current();
             GUILayout.Label(Labels.GetFullFsmLabelWithInstanceID(current2.fsm), new GUILayoutOption[0]);
         }
     }
     GUILayout.Label("RecentlySelectedList: ", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     using (List <SkillSelectionHistory.HistoryItem> .Enumerator enumerator3 = this.recentlySelectedList.GetEnumerator())
     {
         while (enumerator3.MoveNext())
         {
             SkillSelectionHistory.HistoryItem current3 = enumerator3.get_Current();
             GUILayout.Label(Labels.GetFullFsmLabelWithInstanceID(current3.fsm), new GUILayoutOption[0]);
         }
     }
     GUILayout.Label("SelectionCache: ", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     using (List <SkillSelection> .Enumerator enumerator4 = this.selectionCache.GetEnumerator())
     {
         while (enumerator4.MoveNext())
         {
             SkillSelection current4 = enumerator4.get_Current();
             GUILayout.Label(Labels.GetFullFsmLabelWithInstanceID(current4.ActiveFsm), new GUILayoutOption[0]);
         }
     }
 }
Beispiel #5
0
        private static void Link(Texture texture, string heading, string body, WelcomeWindow.LinkFunction func, object userData)
        {
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.Space(64f);
            GUILayout.Box(texture, GUIStyle.get_none(), new GUILayoutOption[]
            {
                GUILayout.MaxWidth(48f)
            });
            GUILayout.Space(10f);
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            GUILayout.Space(1f);
            GUILayout.Label(heading, EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
            GUILayout.Label(body, SkillEditorStyles.LabelWithWordWrap, new GUILayoutOption[0]);
            GUILayout.EndVertical();
            GUILayout.EndHorizontal();
            Rect lastRect = GUILayoutUtility.GetLastRect();

            EditorGUIUtility.AddCursorRect(lastRect, 4);
            if (Event.get_current().get_type() == null && lastRect.Contains(Event.get_current().get_mousePosition()))
            {
                func(userData);
            }
            GUILayout.Space(10f);
        }
Beispiel #6
0
 private static bool VerifyCredentials()
 {
     if (!RemoteConfig.IsInitialized())
     {
         RemoteConfig.Init((Action)null, (Action)null);
     }
     if (!APIUser.get_IsLoggedInWithCredentials() && ApiCredentials.Load())
     {
         APIUser.FetchCurrentUser((Action <ApiModelContainer <APIUser> >) delegate(ApiModelContainer <APIUser> c)
         {
             AnalyticsSDK.LoggedInUserChanged(c.get_Model() as APIUser);
         }, (Action <ApiModelContainer <APIUser> >)null);
     }
     if (!APIUser.get_IsLoggedInWithCredentials())
     {
         GUILayout.Label("Please use the \"VRChat SDK/Settings\" window to log in.", EditorStyles.get_boldLabel(), (GUILayoutOption[])new GUILayoutOption[0]);
         return(false);
     }
     return(true);
 }
    public override void OnInspectorGUI()
    {
        //IL_01b5: Unknown result type (might be due to invalid IL or missing references)
        //IL_01cb: Unknown result type (might be due to invalid IL or missing references)
        PipelineManager pipeline = (PipelineManager)this.get_target();

        EditorGUILayout.LabelField("Unity Version", Application.get_unityVersion(), (GUILayoutOption[])new GUILayoutOption[0]);
        if (!loggingIn)
        {
            bool flag = ApiCredentials.IsLoaded();
            if (!flag)
            {
                flag = ApiCredentials.Load();
            }
            if (!APIUser.IsLoggedInWithCredentials && flag)
            {
                API.SetOnlineMode(online: true);
                loggingIn = true;
                APIUser.FetchCurrentUser(delegate(ApiModelContainer <APIUser> c)
                {
                    loggingIn     = false;
                    pipeline.user = (c.Model as APIUser);
                }, delegate
                {
                    loggingIn = false;
                });
            }
            else if (APIUser.IsLoggedInWithCredentials && !flag)
            {
                pipeline.user = null;
            }
        }
        pipeline.launchedFromSDKPipeline = launchedFromSDKPipeline;
        string text = (!APIUser.IsLoggedInWithCredentials) ? "None" : pipeline.blueprintId;

        if (string.IsNullOrEmpty(text))
        {
            tmpBlueprintId = EditorGUILayout.TextField("Blueprint ID (Optional)", tmpBlueprintId, (GUILayoutOption[])new GUILayoutOption[0]);
        }
        else
        {
            EditorGUILayout.PrefixLabel("Blueprint ID");
            EditorGUILayout.SelectableLabel(text, (GUILayoutOption[])new GUILayoutOption[0]);
        }
        string text2 = (!string.IsNullOrEmpty(text)) ? "Detach (Optional)" : "Attach (Optional)";

        if (APIUser.IsLoggedInWithCredentials && GUILayout.Button(text2, (GUILayoutOption[])new GUILayoutOption[0]))
        {
            if (string.IsNullOrEmpty(text))
            {
                text = (pipeline.blueprintId = tmpBlueprintId);
                pipeline.completedSDKPipeline = true;
            }
            else
            {
                pipeline.blueprintId          = string.Empty;
                pipeline.completedSDKPipeline = false;
            }
            EditorUtility.SetDirty(pipeline);
            EditorSceneManager.MarkSceneDirty(pipeline.get_gameObject().get_scene());
            EditorSceneManager.SaveScene(pipeline.get_gameObject().get_scene());
        }
        if (!APIUser.IsLoggedInWithCredentials)
        {
            GUILayout.Label("Use the settings menu to log in.", EditorStyles.get_boldLabel(), (GUILayoutOption[])new GUILayoutOption[0]);
        }
    }
 private static void ControlGroup(string title)
 {
     GUILayout.Space(10f);
     GUILayout.Label(title, EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
     GUILayout.Space(5f);
 }
Beispiel #9
0
        private void DoSortedByAction()
        {
            List <Type> list = new List <Type>();

            using (List <ActionReport> .Enumerator enumerator = ActionReport.ActionReportList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ActionReport current = enumerator.get_Current();
                    Type         type    = current.action.GetType();
                    if (!list.Contains(type))
                    {
                        list.Add(type);
                    }
                }
            }
            this.currentAction = null;
            using (List <Type> .Enumerator enumerator2 = list.GetEnumerator())
            {
                while (enumerator2.MoveNext())
                {
                    Type current2 = enumerator2.get_Current();
                    SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
                    GUILayout.Label(Labels.GetActionLabel(current2), EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
                    this.currentFSM   = null;
                    this.currentState = null;
                    List <SkillState>   list2 = new List <SkillState>();
                    List <ActionReport> list3 = new List <ActionReport>();
                    List <string>       list4 = new List <string>();
                    SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
                    GUILayout.Label(Strings.get_ActionReportWindow_Action_Changes_Title(), EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
                    using (List <ActionReport> .Enumerator enumerator3 = ActionReport.ActionReportList.GetEnumerator())
                    {
                        while (enumerator3.MoveNext())
                        {
                            ActionReport current3 = enumerator3.get_Current();
                            Type         type2    = current3.action.GetType();
                            if (type2 == current2)
                            {
                                if (!list2.Contains(current3.state))
                                {
                                    list3.Add(current3);
                                    list2.Add(current3.state);
                                }
                                if (!list4.Contains(current3.logText))
                                {
                                    ActionReportWindow.DoReportLine(Strings.get_Tab(), current3);
                                    list4.Add(current3.logText);
                                }
                            }
                        }
                    }
                    SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
                    GUILayout.Label(Strings.get_ActionReportWindow_Effected_States_Title(), EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
                    using (List <ActionReport> .Enumerator enumerator4 = list3.GetEnumerator())
                    {
                        while (enumerator4.MoveNext())
                        {
                            ActionReport current4 = enumerator4.get_Current();
                            if (current4.state != null && !(current4.fsm == null))
                            {
                                if (GUILayout.Button(Strings.get_Tab() + Labels.GetFullStateLabel(current4.state), EditorStyles.get_label(), new GUILayoutOption[0]))
                                {
                                    ActionReportWindow.SelectReport(current4);
                                    return;
                                }
                                EditorGUIUtility.AddCursorRect(GUILayoutUtility.GetLastRect(), 4);
                            }
                        }
                    }
                }
            }
        }
Beispiel #10
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();
     }
 }
        public static void OnGUI()
        {
            EditorGUI.BeginChangeCheck();
            Skill fsm = SkillEditor.SelectedFsm;

            if (fsm == null)
            {
                GUILayout.FlexibleSpace();
                return;
            }
            if (!FsmInspector.isInitialized)
            {
                FsmInspector.isInitialized = true;
                FsmInspector.Init();
            }
            FsmInspector.scrollViewPosition = GUILayout.BeginScrollView(FsmInspector.scrollViewPosition, new GUILayoutOption[0]);
            EditorGUI.BeginChangeCheck();
            fsm.set_Name(EditorGUILayout.TextField(fsm.get_Name(), new GUILayoutOption[0]));
            if (EditorGUI.EndChangeCheck())
            {
                Labels.Update(fsm);
            }
            if (fsm.get_Owner() != null)
            {
                GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                SkillTemplate fsmTemplate = (SkillTemplate)EditorGUILayout.ObjectField(FsmInspector.SelectedTemplate, typeof(SkillTemplate), false, new GUILayoutOption[0]);
                if (fsmTemplate != FsmInspector.SelectedTemplate)
                {
                    FsmInspector.SelectTemplate(fsmTemplate);
                }
                if (GUILayout.Button(SkillEditorContent.BrowseTemplateButton, new GUILayoutOption[]
                {
                    GUILayout.MaxWidth(30f),
                    GUILayout.Height(16f)
                }))
                {
                    Templates.DoSelectTemplateMenu(FsmInspector.SelectedTemplate, new GenericMenu.MenuFunction(FsmInspector.ClearTemplate), new GenericMenu.MenuFunction2(FsmInspector.SelectTemplate));
                }
                GUILayout.EndHorizontal();
            }
            EditorGUI.BeginDisabledGroup(!Application.get_isPlaying() && SkillEditor.SelectedFsmUsesTemplate);
            if (fsm.get_Template() != null)
            {
                fsm = fsm.get_Template().fsm;
            }
            fsm.set_Description(SkillEditorGUILayout.TextAreaWithHint(fsm.get_Description(), Strings.get_Label_Description___(), new GUILayoutOption[]
            {
                GUILayout.MinHeight(80f)
            }));
            EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
            fsm.set_DocUrl(SkillEditorGUILayout.TextFieldWithHint(fsm.get_DocUrl(), Strings.get_Tooltip_Documentation_Url(), new GUILayoutOption[0]));
            EditorGUI.BeginDisabledGroup(!string.IsNullOrEmpty(fsm.get_DocUrl()));
            if (SkillEditorGUILayout.HelpButton("Online Help"))
            {
                Application.OpenURL(fsm.get_DocUrl());
            }
            EditorGUI.EndDisabledGroup();
            EditorGUILayout.EndHorizontal();
            EditorGUI.BeginDisabledGroup(!Application.get_isPlaying() && SkillEditor.SelectedFsmUsesTemplate);
            fsm.set_MaxLoopCountOverride(EditorGUILayout.IntField(SkillEditorContent.MaxLoopOverrideLabel, fsm.get_MaxLoopCountOverride(), new GUILayoutOption[0]));
            fsm.RestartOnEnable = GUILayout.Toggle(fsm.RestartOnEnable, SkillEditorContent.ResetOnDisableLabel, new GUILayoutOption[0]);
            EditorGUI.EndDisabledGroup();
            EditorGUI.EndDisabledGroup();
            fsm = SkillEditor.SelectedFsm;
            SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
            GUILayout.Label(SkillEditorContent.FsmControlsLabel, EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
            if (fsm.ExposedEvents.get_Count() + FsmInspector.fsmVariables.get_Count() == 0)
            {
                SkillEditorGUILayout.DisabledLabel(Strings.get_Label_None_In_Table());
            }
            else
            {
                SkillEditorGUILayout.LabelWidth(100f);
                int num = 0;
                for (int i = 0; i < FsmInspector.fsmVariables.get_Count(); i++)
                {
                    SkillVariable fsmVariable = FsmInspector.fsmVariables.get_Item(i);
                    if (fsmVariable.ShowInInspector)
                    {
                        int categoryID = fsmVariable.CategoryID;
                        if (categoryID > 0 && categoryID != num)
                        {
                            num = categoryID;
                            GUILayout.Label(SkillEditor.SelectedFsm.get_Variables().get_Categories()[categoryID], EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
                            SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
                        }
                        fsmVariable.DoInspectorGUI(SkillEditorContent.TempContent(fsmVariable.Name, fsmVariable.Name + ((!string.IsNullOrEmpty(fsmVariable.Tooltip)) ? (":\n" + fsmVariable.Tooltip) : "")), false);
                    }
                }
                using (List <SkillEvent> .Enumerator enumerator = fsm.ExposedEvents.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        SkillEvent current = enumerator.get_Current();
                        if (GUILayout.Button(current.get_Name(), new GUILayoutOption[0]))
                        {
                            fsm.Event(current);
                        }
                    }
                }
                if (GUI.get_changed())
                {
                    SkillEditor.RepaintAll();
                }
            }
            if (FsmEditorSettings.ShowHints)
            {
                GUILayout.Box(Strings.get_Hint_Expose_Events_and_Variables(), SkillEditorStyles.HintBox, new GUILayoutOption[0]);
            }
            SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
            GUILayout.Label(SkillEditorContent.NetworkSyncLabel, EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
            int num2 = 0;

            SkillBool[] boolVariables = fsm.get_Variables().get_BoolVariables();
            for (int j = 0; j < boolVariables.Length; j++)
            {
                SkillBool fsmBool = boolVariables[j];
                if (fsmBool.get_NetworkSync())
                {
                    GUILayout.Label(fsmBool.get_Name(), new GUILayoutOption[0]);
                    num2++;
                }
            }
            SkillFloat[] floatVariables = fsm.get_Variables().get_FloatVariables();
            for (int k = 0; k < floatVariables.Length; k++)
            {
                SkillFloat fsmFloat = floatVariables[k];
                if (fsmFloat.get_NetworkSync())
                {
                    GUILayout.Label(fsmFloat.get_Name(), new GUILayoutOption[0]);
                    num2++;
                }
            }
            SkillInt[] intVariables = fsm.get_Variables().get_IntVariables();
            for (int l = 0; l < intVariables.Length; l++)
            {
                SkillInt fsmInt = intVariables[l];
                if (fsmInt.get_NetworkSync())
                {
                    GUILayout.Label(fsmInt.get_Name(), new GUILayoutOption[0]);
                    num2++;
                }
            }
            SkillQuaternion[] quaternionVariables = fsm.get_Variables().get_QuaternionVariables();
            for (int m = 0; m < quaternionVariables.Length; m++)
            {
                SkillQuaternion fsmQuaternion = quaternionVariables[m];
                if (fsmQuaternion.get_NetworkSync())
                {
                    GUILayout.Label(fsmQuaternion.get_Name(), new GUILayoutOption[0]);
                    num2++;
                }
            }
            SkillVector3[] vector3Variables = fsm.get_Variables().get_Vector3Variables();
            for (int n = 0; n < vector3Variables.Length; n++)
            {
                SkillVector3 fsmVector = vector3Variables[n];
                if (fsmVector.get_NetworkSync())
                {
                    GUILayout.Label(fsmVector.get_Name(), new GUILayoutOption[0]);
                    num2++;
                }
            }
            if (num2 == 0)
            {
                SkillEditorGUILayout.DisabledLabel(Strings.get_Label_None_In_Table());
            }
            if (FsmEditorSettings.ShowHints)
            {
                GUILayout.Box(Strings.get_Hint_Network_Sync_Variables(), SkillEditorStyles.HintBox, new GUILayoutOption[0]);
            }
            SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
            GUILayout.Label("Debug", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
            fsm.set_ShowStateLabel(GUILayout.Toggle(fsm.get_ShowStateLabel(), SkillEditorContent.ShowStateLabelsLabel, new GUILayoutOption[0]));
            fsm.EnableBreakpoints = GUILayout.Toggle(fsm.EnableBreakpoints, SkillEditorContent.EnableBreakpointsLabel, new GUILayoutOption[0]);
            fsm.EnableDebugFlow   = GUILayout.Toggle(fsm.EnableDebugFlow, SkillEditorContent.EnableDebugFlowLabel, new GUILayoutOption[0]);
            SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
            GUILayout.Label("Experimental", EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
            EditorGUILayout.HelpBox(Strings.get_Help_Experimental_Warning(), 0);
            fsm.set_KeepDelayedEventsOnStateExit(GUILayout.Toggle(fsm.get_KeepDelayedEventsOnStateExit(), SkillEditorContent.KeepDelayedEvents, new GUILayoutOption[0]));
            fsm.set_ManualUpdate(GUILayout.Toggle(fsm.get_ManualUpdate(), SkillEditorContent.ManualUpdate, new GUILayoutOption[0]));
            GUILayout.EndScrollView();
            EventType arg_641_0 = Event.get_current().get_type();

            if (EditorGUI.EndChangeCheck())
            {
                SkillEditor.SetFsmDirty(false, false);
            }
            if (Event.get_current().get_type() == null)
            {
                GUIUtility.set_keyboardControl(0);
            }
            SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
            EditorGUI.BeginDisabledGroup(true);
            GUILayout.Label("Data Version: " + fsm.get_DataVersion(), EditorStyles.get_miniLabel(), new GUILayoutOption[0]);
            EditorGUI.EndDisabledGroup();
            SkillEditorGUILayout.LockFsmGUI(fsm);
        }
Beispiel #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;
 }