|
|
@ -38,6 +38,7 @@ namespace Fungus.EditorUtils |
|
|
|
protected Texture2D addIcon; |
|
|
|
protected Texture2D addIcon; |
|
|
|
protected Texture2D duplicateIcon; |
|
|
|
protected Texture2D duplicateIcon; |
|
|
|
protected Texture2D deleteIcon; |
|
|
|
protected Texture2D deleteIcon; |
|
|
|
|
|
|
|
protected string commandTextFieldContents = string.Empty; |
|
|
|
|
|
|
|
|
|
|
|
static List<System.Type> commandTypes; |
|
|
|
static List<System.Type> commandTypes; |
|
|
|
static List<System.Type> eventHandlerTypes; |
|
|
|
static List<System.Type> eventHandlerTypes; |
|
|
@ -308,6 +309,8 @@ namespace Fungus.EditorUtils |
|
|
|
|
|
|
|
|
|
|
|
GUILayout.FlexibleSpace(); |
|
|
|
GUILayout.FlexibleSpace(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
commandTextFieldContents = GUILayout.TextField(commandTextFieldContents, GUILayout.MinWidth(20), GUILayout.MaxWidth(200)); |
|
|
|
|
|
|
|
|
|
|
|
// Add Button |
|
|
|
// Add Button |
|
|
|
if (GUILayout.Button(addIcon)) |
|
|
|
if (GUILayout.Button(addIcon)) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -747,10 +750,18 @@ namespace Fungus.EditorUtils |
|
|
|
return filteredAttributes.Values.ToList<KeyValuePair<System.Type, CommandInfoAttribute>>(); |
|
|
|
return filteredAttributes.Values.ToList<KeyValuePair<System.Type, CommandInfoAttribute>>(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Used by GenericMenu Delegate |
|
|
|
protected static void AddCommandCallback(object obj) |
|
|
|
protected static void AddCommandCallback(object obj) |
|
|
|
{ |
|
|
|
{ |
|
|
|
AddCommandOperation commandOperation = obj as AddCommandOperation; |
|
|
|
AddCommandOperation commandOperation = obj as AddCommandOperation; |
|
|
|
|
|
|
|
if (commandOperation != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
AddCommandCallback(commandOperation); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected static void AddCommandCallback(AddCommandOperation commandOperation) |
|
|
|
|
|
|
|
{ |
|
|
|
var block = commandOperation.block; |
|
|
|
var block = commandOperation.block; |
|
|
|
if (block == null) |
|
|
|
if (block == null) |
|
|
|
{ |
|
|
|
{ |
|
|
|