Explorar o código

Made toolbar resize intelligently.

Daniel Buckmaster %!s(int64=10) %!d(string=hai) anos
pai
achega
61e106251d

+ 1 - 1
Templates/Empty/game/tools/worldEditor/gui/ToolsToolbar.ed.gui

@@ -8,7 +8,7 @@
    HorizSizing = "right";
    VertSizing = "bottom";
    Position = "0 31";
-   Extent = (29 + 4) * 14 + 12 SPC "33";
+   Extent = "0 33";
    MinExtent = "8 2";
    canSave = "1";
    Visible = "1";

+ 1 - 0
Templates/Empty/game/tools/worldEditor/scripts/EditorGui.ed.cs

@@ -384,6 +384,7 @@ function EditorGui::addToToolsToolbar( %this, %pluginName, %internalName, %bitma
          useMouseEvents = "0";
       };
       ToolsToolbarArray.add(%button);
+      EWToolsToolbar.setExtent((25 + 8) * (%count + 1) + 12 SPC "33");
    }
 }
 

+ 1 - 1
Templates/Full/game/tools/worldEditor/gui/ToolsToolbar.ed.gui

@@ -8,7 +8,7 @@
    HorizSizing = "right";
    VertSizing = "bottom";
    Position = "0 31";
-   Extent = (29 + 4) * 14 + 12 SPC "33";
+   Extent = "0 33";
    MinExtent = "8 2";
    canSave = "1";
    Visible = "1";

+ 1 - 0
Templates/Full/game/tools/worldEditor/scripts/EditorGui.ed.cs

@@ -384,6 +384,7 @@ function EditorGui::addToToolsToolbar( %this, %pluginName, %internalName, %bitma
          useMouseEvents = "0";
       };
       ToolsToolbarArray.add(%button);
+      EWToolsToolbar.setExtent((25 + 8) * (%count + 1) + 12 SPC "33");
    }
 }