mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Merge pull request #1167 from Azaezel/alpha41/borderBashing
expose guiwindowctrl resize margin to script
This commit is contained in:
commit
bede5244e3
1 changed files with 4 additions and 2 deletions
|
|
@ -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 ),
|
||||||
|
|
@ -1490,7 +1492,7 @@ const RectI GuiWindowCtrl::getClientRect()
|
||||||
// Finally, inset it by padding
|
// Finally, inset it by padding
|
||||||
// Inset by padding. margin is specified for all t/b/l/r but
|
// Inset by padding. margin is specified for all t/b/l/r but
|
||||||
// uses only pointx pointy uniformly on both ends. This should be fixed. - JDD
|
// uses only pointx pointy uniformly on both ends. This should be fixed. - JDD
|
||||||
// winRect.inset( mSizingOptions.mPadding.point.x, mSizingOptions.mPadding.point.y );
|
winRect.inset(mResizeMargin, mResizeMargin);
|
||||||
|
|
||||||
return winRect;
|
return winRect;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue