コード例 #1
0
        public override void DoGUI()
        {
            fsmEditor.OnGUI();

            /* Debug Repaint events
            if (Event.current.type == EventType.repaint)
            {
                Debug.Log("Repaint");
            }*/

            if (Event.current.type == EventType.ValidateCommand)
            {
                switch (Event.current.commandName)
                {
                    case "UndoRedoPerformed":
                    case "Cut":
                    case "Copy":
                    case "Paste":
                    case "SelectAll":
                        Event.current.Use();
                        break;
                }
            }

            if (Event.current.type == EventType.ExecuteCommand)
            {
                switch (Event.current.commandName)
                {
                    /* replaced with Undo.undoRedoPerformed callback added in Unity 4.3
                    case "UndoRedoPerformed":
                        FsmEditor.UndoRedoPerformed();
                        break;
                    */

                    case "Cut":
                        FsmEditor.Cut();
                        break;

                    case "Copy":
                        FsmEditor.Copy();
                        break;

                    case "Paste":
                        FsmEditor.Paste();
                        break;

                    case "SelectAll":
                        FsmEditor.SelectAll();
                        break;

                    case "OpenWelcomeWindow":
                        GetWindow<PlayMakerWelcomeWindow>();
                        break;

                    case "OpenToolWindow":
                        toolWindow = GetWindow<ContextToolWindow>();
                        break;

                    case "OpenFsmSelectorWindow":
                        fsmSelectorWindow = GetWindow<FsmSelectorWindow>();
                        fsmSelectorWindow.ShowUtility();
                        break;

                    case "OpenFsmTemplateWindow":
                        fsmTemplateWindow = GetWindow<FsmTemplateWindow>();
                        break;

                    case "OpenStateSelectorWindow":
                        stateSelectorWindow = GetWindow<FsmStateWindow>();
                        break;

                    case "OpenActionWindow":
                        actionWindow = GetWindow<FsmActionWindow>();
                        break;

                    case "OpenGlobalEventsWindow":
                        globalEventsWindow = GetWindow<FsmEventsWindow>();
                        break;

                    case "OpenGlobalVariablesWindow":
                        globalVariablesWindow = GetWindow<FsmGlobalsWindow>();
                        break;

                    case "OpenErrorWindow":
                        errorWindow = GetWindow<FsmErrorWindow>();
                        break;

                    case "OpenTimelineWindow":
                        timelineWindow = GetWindow<FsmTimelineWindow>();
                        break;

                    case "OpenFsmLogWindow":
                        logWindow = GetWindow<FsmLogWindow>();
                        break;

                    case "OpenAboutWindow":
                        aboutWindow = GetWindow<AboutWindow>();
                        break;

                    case "OpenReportWindow":
                        reportWindow = GetWindow<ReportWindow>();
                        break;

                    case "AddFsmComponent":
                        PlayMakerMainMenu.AddFsmToSelected();
                        break;

                    case "RepaintAll":
                        RepaintAllWindows();
                        break;

                    case "ChangeLanguage":
                        ResetWindowTitles();
                        break;
                }

                GUIUtility.ExitGUI();
            }
        }
コード例 #2
0
    public void OnGUI()
    {
        fsmEditor.OnGUI();

        /*		BeginWindows();

        fsmEditor.DoPopupWindows();

        EndWindows();*/

        if (Event.current.type == EventType.ValidateCommand)
        {
            //Debug.Log(Event.current.commandName);

            switch (Event.current.commandName)
            {
                case "UndoRedoPerformed":
                    Event.current.Use();
                    break;

                case "Copy":
                    Event.current.Use();
                    break;

                case "Paste":
                    Event.current.Use();
                    break;

                case "SelectAll":
                    Event.current.Use();
                    break;
            }
        }

        if (Event.current.type == EventType.ExecuteCommand)
        {

            //Debug.Log(Event.current.commandName);

            switch (Event.current.commandName)
            {
                case "UndoRedoPerformed":
                    FsmEditor.UndoRedoPerformed();
                    break;

                case "Copy":
                    FsmEditor.Copy();
                    break;

                case "Paste":
                    FsmEditor.Paste();
                    break;

                case "SelectAll":
                    FsmEditor.SelectAll();
                    break;

                case "OpenToolWindow":
                    toolWindow = GetWindow<ContextToolWindow>();
                    break;

                case "OpenFsmSelectorWindow":
                    fsmSelectorWindow = GetWindow<FsmSelectorWindow>();
                    fsmSelectorWindow.ShowUtility();
                    break;

                case "OpenFsmTemplateWindow":
                    fsmTemplateWindow = GetWindow<FsmTemplateWindow>();
                    break;

                case "OpenStateSelectorWindow":
                    stateSelectorWindow = GetWindow<FsmStateWindow>();
                    break;

                case "OpenActionWindow":
                    actionWindow = GetWindow<FsmActionWindow>();
                    break;

                case "OpenGlobalEventsWindow":
                    globalEventsWindow = GetWindow<FsmEventsWindow>();
                    break;

                case "OpenGlobalVariablesWindow":
                    globalVariablesWindow = GetWindow<FsmGlobalsWindow>();
                    break;

                case "OpenErrorWindow":
                    errorWindow = GetWindow<FsmErrorWindow>();
                    break;

                case "OpenFsmLogWindow":
                    logWindow = GetWindow<FsmLogWindow>();
                    break;

                case "OpenAboutWindow":
                    aboutWindow = GetWindow<AboutWindow>();
                    break;

                case "OpenReportWindow":
                    reportWindow = GetWindow<ReportWindow>();
                    break;

                case "AddFsmComponent":
                    PlayMakerMainMenu.AddFsmToSelected();
                    break;

                case "RepaintAll":
                    RepaintAllWindows();
                    break;
            }

            GUIUtility.ExitGUI();
        }
    }
コード例 #3
0
ファイル: FsmEditorWindow.cs プロジェクト: tanohmz/shapewars
    public void OnGUI()
    {
        fsmEditor.OnGUI();

/*		BeginWindows();
 *
 *              fsmEditor.DoPopupWindows();
 *
 *              EndWindows();*/

        if (Event.current.type == EventType.ValidateCommand)
        {
            //Debug.Log(Event.current.commandName);

            switch (Event.current.commandName)
            {
            case "UndoRedoPerformed":
                FsmEditor.UndoRedoPerformed();
                break;

            case "Copy":
                EditorCommands.CopyStateSelection();
                break;

            case "Paste":
                EditorCommands.PasteStates();
                break;
            }
        }

        if (Event.current.type == EventType.ExecuteCommand)
        {
            //Debug.Log(Event.current.commandName);

            switch (Event.current.commandName)
            {
            case "OpenToolWindow":
                toolWindow = GetWindow <ContextToolWindow>();
                break;

            case "OpenFsmSelectorWindow":
                fsmSelectorWindow = GetWindow <FsmSelectorWindow>();
                fsmSelectorWindow.ShowUtility();
                break;

            case "OpenFsmTemplateWindow":
                fsmTemplateWindow = GetWindow <FsmTemplateWindow>();
                break;

            case "OpenStateSelectorWindow":
                stateSelectorWindow = GetWindow <FsmStateWindow>();
                break;

            case "OpenActionWindow":
                actionWindow = GetWindow <FsmActionWindow>();
                break;

            case "OpenErrorWindow":
                errorWindow = GetWindow <FsmErrorWindow>();
                break;

            case "OpenFsmLogWindow":
                logWindow = GetWindow <FsmLogWindow>();
                break;

            case "OpenAboutWindow":
                aboutWindow = GetWindow <AboutWindow>();
                break;

            case "AddFsmComponent":
                AddFsmToSelected();
                break;

            case "RepaintAll":
                RepaintAllWindows();
                break;
            }

            GUIUtility.ExitGUI();
        }
    }
コード例 #4
0
        public override void DoGUI()
        {
            fsmEditor.OnGUI();

            /* Debug Repaint events
             * if (Event.current.type == EventType.repaint)
             * {
             *  Debug.Log("Repaint");
             * }*/

            if (Event.current.type == EventType.ValidateCommand)
            {
                switch (Event.current.commandName)
                {
                case "UndoRedoPerformed":
                case "Cut":
                case "Copy":
                case "Paste":
                case "SelectAll":
                    Event.current.Use();
                    break;
                }
            }

            if (Event.current.type == EventType.ExecuteCommand)
            {
                switch (Event.current.commandName)
                {
                /* replaced with Undo.undoRedoPerformed callback added in Unity 4.3
                 * case "UndoRedoPerformed":
                 *  FsmEditor.UndoRedoPerformed();
                 *  break;
                 */

                case "Cut":
                    FsmEditor.Cut();
                    break;

                case "Copy":
                    FsmEditor.Copy();
                    break;

                case "Paste":
                    FsmEditor.Paste();
                    break;

                case "SelectAll":
                    FsmEditor.SelectAll();
                    break;

                case "OpenWelcomeWindow":
                    GetWindow <PlayMakerWelcomeWindow>();
                    break;

                case "OpenToolWindow":
                    toolWindow = GetWindow <ContextToolWindow>();
                    break;

                case "OpenFsmSelectorWindow":
                    fsmSelectorWindow = GetWindow <FsmSelectorWindow>();
                    fsmSelectorWindow.ShowUtility();
                    break;

                case "OpenFsmTemplateWindow":
                    fsmTemplateWindow = GetWindow <FsmTemplateWindow>();
                    break;

                case "OpenStateSelectorWindow":
                    stateSelectorWindow = GetWindow <FsmStateWindow>();
                    break;

                case "OpenActionWindow":
                    actionWindow = GetWindow <FsmActionWindow>();
                    break;

                case "OpenGlobalEventsWindow":
                    globalEventsWindow = GetWindow <FsmEventsWindow>();
                    break;

                case "OpenGlobalVariablesWindow":
                    globalVariablesWindow = GetWindow <FsmGlobalsWindow>();
                    break;

                case "OpenErrorWindow":
                    errorWindow = GetWindow <FsmErrorWindow>();
                    break;

                case "OpenTimelineWindow":
                    timelineWindow = GetWindow <FsmTimelineWindow>();
                    break;

                case "OpenFsmLogWindow":
                    logWindow = GetWindow <FsmLogWindow>();
                    break;

                case "OpenAboutWindow":
                    aboutWindow = GetWindow <AboutWindow>();
                    break;

                case "OpenReportWindow":
                    reportWindow = GetWindow <ReportWindow>();
                    break;

                case "AddFsmComponent":
                    PlayMakerMainMenu.AddFsmToSelected();
                    break;

                case "RepaintAll":
                    RepaintAllWindows();
                    break;

                case "ChangeLanguage":
                    ResetWindowTitles();
                    break;
                }

                GUIUtility.ExitGUI();
            }
        }
コード例 #5
0
    /// <summary>
    /// Do the GUI
    /// </summary>
    void OnGUI()
    {
        fsmEditor.OnGUI();

/*		BeginWindows();
 *
 *              fsmEditor.DoPopupWindows();
 *
 *              EndWindows();*/

        if (Event.current.type == EventType.ValidateCommand)
        {
            //Debug.Log(Event.current.commandName);

            switch (Event.current.commandName)
            {
            case "UndoRedoPerformed":
                Event.current.Use();
                break;

            case "Copy":
                Event.current.Use();
                break;

            case "Paste":
                Event.current.Use();
                break;

            case "SelectAll":
                Event.current.Use();
                break;
            }
        }

        if (Event.current.type == EventType.ExecuteCommand)
        {
            //Debug.Log(Event.current.commandName);

            switch (Event.current.commandName)
            {
            case "UndoRedoPerformed":
                FsmEditor.UndoRedoPerformed();
                break;

            case "Copy":
                FsmEditor.Copy();
                break;

            case "Paste":
                FsmEditor.Paste();
                break;

            case "SelectAll":
                FsmEditor.SelectAll();
                break;

            case "OpenWelcomeWindow":
                GetWindow <PlayMakerWelcomeWindow>();
                break;

            case "OpenToolWindow":
                toolWindow = GetWindow <ContextToolWindow>();
                break;

            case "OpenFsmSelectorWindow":
                fsmSelectorWindow = GetWindow <FsmSelectorWindow>();
                fsmSelectorWindow.ShowUtility();
                break;

            case "OpenFsmTemplateWindow":
                fsmTemplateWindow = GetWindow <FsmTemplateWindow>();
                break;

            case "OpenStateSelectorWindow":
                stateSelectorWindow = GetWindow <FsmStateWindow>();
                break;

            case "OpenActionWindow":
                actionWindow = GetWindow <FsmActionWindow>();
                break;

            case "OpenGlobalEventsWindow":
                globalEventsWindow = GetWindow <FsmEventsWindow>();
                break;

            case "OpenGlobalVariablesWindow":
                globalVariablesWindow = GetWindow <FsmGlobalsWindow>();
                break;

            case "OpenErrorWindow":
                errorWindow = GetWindow <FsmErrorWindow>();
                break;

            case "OpenFsmLogWindow":
                logWindow = GetWindow <FsmLogWindow>();
                break;

            case "OpenAboutWindow":
                aboutWindow = GetWindow <AboutWindow>();
                break;

            case "OpenReportWindow":
                reportWindow = GetWindow <ReportWindow>();
                break;

            case "AddFsmComponent":
                PlayMakerMainMenu.AddFsmToSelected();
                break;

            case "RepaintAll":
                RepaintAllWindows();
                break;
            }

            GUIUtility.ExitGUI();
        }
    }