Ejemplo n.º 1
0
 private void DoErrorHierarchyGUI()
 {
     this.scrollPosition = GUILayout.BeginScrollView(this.scrollPosition, new GUILayoutOption[0]);
     GUILayout.BeginVertical(new GUILayoutOption[0]);
     using (List <FsmError> .Enumerator enumerator = FsmErrorChecker.GetErrors().GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             FsmError current = enumerator.get_Current();
             if (!this.filterByFsm || current.Fsm == SkillEditor.SelectedFsm)
             {
                 GUIStyle gUIStyle = SkillEditorStyles.ActionItem;
                 if (this.selectedError == current)
                 {
                     gUIStyle = SkillEditorStyles.ActionItemSelected;
                 }
                 SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
                 if (GUILayout.Button(current.ErrorString, gUIStyle, new GUILayoutOption[0]) || GUILayout.Button(current.ToString(), gUIStyle, new GUILayoutOption[0]))
                 {
                     this.selectedError = current;
                     ErrorSelector.GotoError(this.selectedError);
                 }
             }
         }
     }
     GUILayout.EndVertical();
     EditorGUIUtility.AddCursorRect(GUILayoutUtility.GetLastRect(), 4);
     GUILayout.EndScrollView();
 }
Ejemplo n.º 2
0
 private void DoToolbar()
 {
     EditorGUILayout.BeginHorizontal(EditorStyles.get_toolbar(), new GUILayoutOption[0]);
     if (GUILayout.Button(Strings.get_ErrorSelector_Refresh(), EditorStyles.get_toolbarButton(), new GUILayoutOption[0]))
     {
         FsmErrorChecker.Refresh();
     }
     GUILayout.FlexibleSpace();
     this.filterByFsm = GUILayout.Toggle(this.filterByFsm, new GUIContent(Strings.get_ErrorSelector_Filter_Selected_FSM_Only(), Strings.get_ErrorSelector_Filter_Selected_FSM()), EditorStyles.get_toolbarButton(), new GUILayoutOption[0]);
     GUILayout.Space(5f);
     if (SkillEditorGUILayout.ToolbarSettingsButton())
     {
         ErrorSelector.GenerateSettingsMenu().ShowAsContext();
     }
     GUILayout.Space(-5f);
     EditorGUILayout.EndHorizontal();
 }
Ejemplo n.º 3
0
 public override void DoGUI()
 {
     this.DoToolbar();
     this.DoErrorHierarchyGUI();
     ErrorSelector.DoBottomPanel();
 }