From 4d5d836ceacfb198598ff6323eb90f69fa271c14 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 2 Sep 2014 23:34:25 +0100 Subject: [PATCH] Fixed Add Command menu popup position --- .../FungusScript/Editor/SequenceEditor.cs | 12 +++--------- Assets/Shuttle/ShuttleGame.unity | Bin 117228 -> 117228 bytes 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Assets/Fungus/FungusScript/Editor/SequenceEditor.cs b/Assets/Fungus/FungusScript/Editor/SequenceEditor.cs index 4cb230d4..cd995e6a 100644 --- a/Assets/Fungus/FungusScript/Editor/SequenceEditor.cs +++ b/Assets/Fungus/FungusScript/Editor/SequenceEditor.cs @@ -72,16 +72,14 @@ namespace Fungus.Script CommandCategoryAttribute categoryAttr = obj as CommandCategoryAttribute; if (categoryAttr != null) { - string commandItem = categoryAttr.Category + " / " + FungusScriptEditor.GetCommandName(type); + string commandItem = categoryAttr.Category + " - " + FungusScriptEditor.GetCommandName(type); commandNames.Add(commandItem); break; } } } - Rect newRect = GUILayoutUtility.GetRect(100, 30); - - int selectedCommandIndex = EditorGUI.Popup(newRect, fungusScript.selectedAddCommandIndex, commandNames.ToArray()); + int selectedCommandIndex = EditorGUILayout.Popup(fungusScript.selectedAddCommandIndex, commandNames.ToArray()); if (EditorGUI.EndChangeCheck()) { @@ -110,7 +108,6 @@ namespace Fungus.Script fungusScript.selectedSequence.commandList.Add(newCommand); } - /* if (fungusScript.copyCommand != null) { if (GUILayout.Button("Paste", EditorStyles.miniButton)) @@ -118,10 +115,9 @@ namespace Fungus.Script FungusCommandEditor.PasteCommand(fungusScript.copyCommand, fungusScript.selectedSequence); } } - */ EditorGUILayout.EndHorizontal(); - + object[] helpAttributes = selectedType.GetCustomAttributes(typeof(HelpTextAttribute), false); foreach (object obj in helpAttributes) { @@ -134,8 +130,6 @@ namespace Fungus.Script break; } } - - EditorGUILayout.Separator(); serializedObject.ApplyModifiedProperties(); } diff --git a/Assets/Shuttle/ShuttleGame.unity b/Assets/Shuttle/ShuttleGame.unity index 1243a7d694488be7be9aaf815188b5c8265305fd..eefa97b1857e436c5c39452c9c1f452fa353da2d 100644 GIT binary patch delta 55 zcmV-70LcIBlLzdR2Y|EzRFDe_0000+)*C}${^XZmkO3V9PtkZ30F&Vc6StI*0mKiN Nu%7`Ww|t-ha4Anc6#xJL delta 58 zcmaDenf=XV_J%EtArrXS7#J9C1j;)ZFrS$oKY>w}=dt4RD4-a_OCY_yV*=v^{^^M} Nj1t=m7BJRm0svoo6lnke