public void OnGUI() { lockSelection = PreferencesEditor.GetBool(Preference.LockSelection); showPreferences = PreferencesEditor.GetBool(Preference.ShowPreference); GUILayout.BeginHorizontal(EditorStyles.toolbar); SelectGameObject(); SelectStateMachine(); if (GUILayout.Button("Lock", (lockSelection?(GUIStyle)"TE toolbarbutton" : EditorStyles.toolbarButton), GUILayout.Width(50))) { lockSelection = !lockSelection; PreferencesEditor.SetBool(Preference.LockSelection, lockSelection); } if (GUILayout.Button("Tools", EditorStyles.toolbarDropDown, GUILayout.Width(50))) { GenericMenu menu = new GenericMenu(); menu.AddItem(new GUIContent("Welcome Screen"), false, delegate() { WelcomeWindow.ShowWindow(); }); menu.AddItem(new GUIContent("Global Variables"), false, delegate() { GlobalVariablesEditor.ShowWindow(); }); menu.AddItem(new GUIContent("Action Browser"), false, delegate() { ActionBrowser.ShowWindow(); }); menu.AddItem(new GUIContent("Condition Browser"), false, delegate() { ConditionBrowser.ShowWindow(); }); menu.AddItem(new GUIContent("Error Console"), false, delegate() { ErrorEditor.ShowWindow(); }); menu.AddItem(new GUIContent("Setup Shortcuts"), false, delegate() { SetupShortcutsEditor.ShowWindow(); }); menu.AddItem(new GUIContent("Fsm Tool"), false, delegate() { FsmTool.ShowWindow(); }); menu.AddItem(new GUIContent("MonoBehaviour Converter"), false, delegate() { MonoBehaviourConverter.ShowWindow(); }); menu.AddItem(new GUIContent("Integrations"), false, delegate() { //IntegrationWindow.ShowWindow (); }); menu.ShowAsContext(); } GUILayout.FlexibleSpace(); if (GUILayout.Button(FsmEditorStyles.popupIcon, (showPreferences?(GUIStyle)"TE toolbarbutton" : EditorStyles.toolbarButton))) { showPreferences = !showPreferences; PreferencesEditor.SetBool(Preference.ShowPreference, showPreferences); } GUILayout.EndHorizontal(); }
public static void ShowWindow() { ActionBrowser window = EditorWindow.GetWindow <ActionBrowser>("Actions"); Vector2 size = new Vector2(250f, 250f); window.minSize = size; UnityEngine.Object.DontDestroyOnLoad(window); }
private void DoEvents(Event ev, bool isMouse) { if (Validate("showHelp", KeyCode.F1, isMouse)) { PreferencesEditor.ToggleBool(Preference.ShowShortcuts); ev.Use(); } if (Validate("centerView", KeyCode.Tab, isMouse)) { FsmEditor.instance.CenterView(); } if (Validate("selectAll", KeyCode.F2, isMouse)) { FsmEditor.instance.ToggleSelection(); ev.Use(); } if (Validate("createState", KeyCode.F3, isMouse) && FsmEditor.instance != null) { FsmEditorUtility.AddNode <State>(ev.mousePosition, FsmEditor.Active); if (FsmEditor.instance != null) { FsmEditor.instance.Repaint(); } ev.Use(); } if (Validate("actionBrowser", KeyCode.F4, isMouse)) { ActionBrowser.ShowWindow(); ev.Use(); } if (Validate("conditionBrowser", KeyCode.F5, isMouse)) { ConditionBrowser.ShowWindow(); ev.Use(); } }
public static void OpenActionBrowser() { ActionBrowser.ShowWindow(); }