diff --git a/Assets/Fungus/Scripts/Editor/FungusEditorPreferences.cs b/Assets/Fungus/Scripts/Editor/FungusEditorPreferences.cs index dc86c201..a69fd9f0 100644 --- a/Assets/Fungus/Scripts/Editor/FungusEditorPreferences.cs +++ b/Assets/Fungus/Scripts/Editor/FungusEditorPreferences.cs @@ -17,10 +17,10 @@ namespace Fungus // Have we loaded the prefs yet private static bool prefsLoaded = false; const string HIDE_MUSH_KEY = "hideMushroomInHierarchy"; - const string USE_EXP_MENUS = "useExperimentalMenus"; + const string USE_LEGACY_MENUS = "useLegacyMenus"; public static bool hideMushroomInHierarchy; - public static bool useExperimentalMenus; + public static bool useLegacyMenus; static FungusEditorPreferences() { @@ -45,13 +45,13 @@ namespace Fungus // Preferences GUI hideMushroomInHierarchy = EditorGUILayout.Toggle("Hide Mushroom Flowchart Icon", hideMushroomInHierarchy); - useExperimentalMenus = EditorGUILayout.Toggle(new GUIContent("Experimental Searchable Menus", "Experimental menus replace the Event, Add Variable and Add Command menus with a searchable menu more like the Unity AddComponent menu."), useExperimentalMenus); + useLegacyMenus = EditorGUILayout.Toggle(new GUIContent("Legacy Menus", "Force Legacy menus for Event, Add Variable and Add Command menus"), useLegacyMenus); // Save the preferences if (GUI.changed) { EditorPrefs.SetBool(HIDE_MUSH_KEY, hideMushroomInHierarchy); - EditorPrefs.SetBool(USE_EXP_MENUS, useExperimentalMenus); + EditorPrefs.SetBool(USE_LEGACY_MENUS, useLegacyMenus); } }, @@ -65,7 +65,7 @@ namespace Fungus public static void LoadOnScriptLoad() { hideMushroomInHierarchy = EditorPrefs.GetBool(HIDE_MUSH_KEY, false); - useExperimentalMenus = EditorPrefs.GetBool(USE_EXP_MENUS, false); + useLegacyMenus = EditorPrefs.GetBool(USE_LEGACY_MENUS, false); prefsLoaded = true; } } diff --git a/Assets/Fungus/Scripts/Editor/PopupContent/CommandSelectorPopupWindowContent.cs b/Assets/Fungus/Scripts/Editor/PopupContent/CommandSelectorPopupWindowContent.cs index b531d267..e0a714a7 100644 --- a/Assets/Fungus/Scripts/Editor/PopupContent/CommandSelectorPopupWindowContent.cs +++ b/Assets/Fungus/Scripts/Editor/PopupContent/CommandSelectorPopupWindowContent.cs @@ -65,7 +65,7 @@ namespace Fungus.EditorUtils curBlock = block; - if (FungusEditorPreferences.useExperimentalMenus) + if (!FungusEditorPreferences.useLegacyMenus) { var win = new CommandSelectorPopupWindowContent(currentHandlerName, width, (int)(height - EditorGUIUtility.singleLineHeight * 3)); diff --git a/Assets/Fungus/Scripts/Editor/PopupContent/EventSelectorPopupWindowContent.cs b/Assets/Fungus/Scripts/Editor/PopupContent/EventSelectorPopupWindowContent.cs index 403b4718..9e490423 100644 --- a/Assets/Fungus/Scripts/Editor/PopupContent/EventSelectorPopupWindowContent.cs +++ b/Assets/Fungus/Scripts/Editor/PopupContent/EventSelectorPopupWindowContent.cs @@ -77,7 +77,7 @@ namespace Fungus.EditorUtils static public void DoEventHandlerPopUp(Rect position, string currentHandlerName, Block block, int width, int height) { - if (FungusEditorPreferences.useExperimentalMenus) + if (!FungusEditorPreferences.useLegacyMenus) { //new method EventSelectorPopupWindowContent win = new EventSelectorPopupWindowContent(currentHandlerName, block, width, height); diff --git a/Assets/Fungus/Scripts/Editor/PopupContent/VariableSelectPopupWindowContent.cs b/Assets/Fungus/Scripts/Editor/PopupContent/VariableSelectPopupWindowContent.cs index a1f2b3e0..ee7c3461 100644 --- a/Assets/Fungus/Scripts/Editor/PopupContent/VariableSelectPopupWindowContent.cs +++ b/Assets/Fungus/Scripts/Editor/PopupContent/VariableSelectPopupWindowContent.cs @@ -61,7 +61,7 @@ namespace Fungus.EditorUtils static public void DoAddVariable(Rect position, string currentHandlerName, Flowchart flowchart) { curFlowchart = flowchart; - if (FungusEditorPreferences.useExperimentalMenus) + if (!FungusEditorPreferences.useLegacyMenus) { //new method VariableSelectPopupWindowContent win = new VariableSelectPopupWindowContent(currentHandlerName, POPUP_WIDTH, POPUP_HEIGHT);