From ff5c46195fca94d2ab20da1999e6d85ab5b68ed9 Mon Sep 17 00:00:00 2001 From: desktop-maesty/steve Date: Mon, 28 May 2018 18:11:25 +1000 Subject: [PATCH] Remove manual left offseting in ReorderableList CommandListAdapter --- Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs index 9306c4da..20b9200b 100644 --- a/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs +++ b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs @@ -57,7 +57,7 @@ namespace Fungus.EditorUtils private void DrawHeader(Rect rect) { - EditorGUI.PrefixLabel(rect, new GUIContent("Commands")); + EditorGUI.LabelField(rect, new GUIContent("Commands")); } public void DrawItem(Rect position, int index, bool selected, bool focused) @@ -136,7 +136,7 @@ namespace Fungus.EditorUtils for (int i = 0; i < command.IndentLevel; ++i) { Rect indentRect = position; - indentRect.x += i * indentSize - 21; + indentRect.x += i * indentSize;// - 21; indentRect.width = indentSize + 1; indentRect.y -= 2; indentRect.height += 5; @@ -148,9 +148,9 @@ namespace Fungus.EditorUtils float indentWidth = command.IndentLevel * indentSize; Rect commandLabelRect = position; - commandLabelRect.x += indentWidth - 21; + commandLabelRect.x += indentWidth;// - 21; commandLabelRect.y -= 2; - commandLabelRect.width -= (indentSize * command.IndentLevel - 22); + commandLabelRect.width -= (indentSize * command.IndentLevel);// - 22); commandLabelRect.height += 5; // There's a weird incompatibility between the Reorderable list control used for the command list and @@ -159,8 +159,8 @@ namespace Fungus.EditorUtils // The workaround for now is to hide the reordering grabber from mouse clicks by extending the command // selection rectangle to cover it. We are planning to totally replace the command list display system. Rect clickRect = position; - clickRect.x -= 20; - clickRect.width += 20; + //clickRect.x -= 20; + //clickRect.width += 20; // Select command via left click if (Event.current.type == EventType.MouseDown &&