Exemplo n.º 1
0
        private static void DoDebugControls()
        {
            int    num  = FsmErrorChecker.CountAllErrors();
            string text = Strings.get_DebugToolbar_No_errors();

            if (num > 0)
            {
                text = string.Format("{0} {1}", num, (num > 1) ? Strings.get_DebugToolbar_Label_Errors() : Strings.get_DebugToolbar_Label_Error());
            }
            SkillEditorContent.DebugToolbarErrorCount.set_text(text);
            if (GUILayout.Button(SkillEditorContent.DebugToolbarErrorCount, SkillEditorStyles.ErrorCount, new GUILayoutOption[0]))
            {
                SkillEditor.OpenErrorWindow();
                GUIUtility.ExitGUI();
            }
            if (Event.get_current().get_type() == 7)
            {
                Rect lastRect = GUILayoutUtility.GetLastRect();
                lastRect.set_x(lastRect.get_x() + 4f);
                lastRect.set_y(lastRect.get_y() + 2f);
                float width;
                lastRect.set_height(width = 14f);
                lastRect.set_width(width);
                GUIHelpers.DrawTexture(lastRect, (num > 0) ? SkillEditorStyles.Errors : SkillEditorStyles.NoErrors, Color.get_white(), 0);
            }
            GUILayout.Space(10f);
            if (GUILayout.Button(SkillEditorContent.DebugToolbarDebug, EditorStyles.get_toolbarDropDown(), new GUILayoutOption[0]))
            {
                DebugToolbar.DoDebugMenu();
            }
        }
Exemplo n.º 2
0
 public static void OnGUI(float width)
 {
     GUILayout.FlexibleSpace();
     GUILayout.BeginHorizontal(EditorStyles.get_toolbar(), new GUILayoutOption[]
     {
         GUILayout.Width(width)
     });
     DebugToolbar.DoDebugControls();
     GUILayout.Space(10f);
     DebugToolbar.DoPlaybackControls();
     GUILayout.Space(10f);
     DebugToolbar.DoDebugFlowControls();
     GUILayout.EndHorizontal();
 }
Exemplo n.º 3
0
 private static void SetDebuggerStepToAnyStateChange()
 {
     FsmDebugger.Instance.StepMode = FsmDebugger.FsmStepMode.StepToAnyStateChange;
     DebugToolbar.SaveStepMode();
 }
Exemplo n.º 4
0
 private static void SetDebuggerStepFrame()
 {
     FsmDebugger.Instance.StepMode = FsmDebugger.FsmStepMode.StepFrame;
     DebugToolbar.SaveStepMode();
 }