Browse Source

expose guiwindowctrl resize margin to script
also up the default to 5 pixels

AzaezelX 1 year ago
parent
commit
ea63a7448e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Engine/source/gui/containers/guiWindowCtrl.cpp

+ 3 - 1
Engine/source/gui/containers/guiWindowCtrl.cpp

@@ -79,7 +79,7 @@ GuiWindowCtrl::GuiWindowCtrl()
       mResizeEdge(edgeNone),
       mResizeEdge(edgeNone),
       mResizeHeight(true),
       mResizeHeight(true),
       mCanMove(true),
       mCanMove(true),
-      mResizeMargin(2.f),
+      mResizeMargin(5.f),
       mCanClose(true),
       mCanClose(true),
       mCanMinimize(true),
       mCanMinimize(true),
       mCanMaximize(true),
       mCanMaximize(true),
@@ -143,6 +143,8 @@ void GuiWindowCtrl::initPersistFields()
          "Whether the window can be resized horizontally." );
          "Whether the window can be resized horizontally." );
       addField( "resizeHeight",      TypeBool,         Offset( mResizeHeight, GuiWindowCtrl ),
       addField( "resizeHeight",      TypeBool,         Offset( mResizeHeight, GuiWindowCtrl ),
          "Whether the window can be resized vertically." );
          "Whether the window can be resized vertically." );
+      addField("resizeMargin", TypeF32, Offset(mResizeMargin, GuiWindowCtrl),
+         "Margin along the window edge to allow grabbing.");
       addField( "canMove",           TypeBool,         Offset( mCanMove, GuiWindowCtrl ),
       addField( "canMove",           TypeBool,         Offset( mCanMove, GuiWindowCtrl ),
          "Whether the window can be moved by dragging its titlebar." );
          "Whether the window can be moved by dragging its titlebar." );
       addField( "canClose",          TypeBool,         Offset( mCanClose, GuiWindowCtrl ),
       addField( "canClose",          TypeBool,         Offset( mCanClose, GuiWindowCtrl ),