mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Improves handling of rendering guiPopupCtrls where if the height extent is taller than the bitmap array height, it'll adjust the height to recenter the displayed bitmap elements.
Streamlined the toolbar for the gui and world editors to utilize a stack, making the behavior and manipulation of toolbar elements significantly more consistent. Added Settings and Asset Browser buttons to both gui and world editor toolbars for easier access. Moved all tool toolbars over to work with the stack system to make them more consistent and better formatting Added saving of asset browser's last position and extent so it remembers it on load. Added editor setting to close the asset browser after completing a drag-n-drop action. Added keybind to editor keybind list, making space toggle the asset browser
This commit is contained in:
parent
ef6efbf738
commit
683c438b09
20 changed files with 341 additions and 215 deletions
|
|
@ -881,6 +881,12 @@ void GuiPopUpMenuCtrl::onRender( Point2I offset, const RectI &updateRect )
|
|||
// Do we render a bitmap border or lines?
|
||||
if ( mProfile->getChildrenProfile() && mProfile->mBitmapArrayRects.size() )
|
||||
{
|
||||
if (mProfile->mBitmapArrayRects[0].extent.y < baseRect.extent.y)
|
||||
{
|
||||
//if our bitmap is smaller than the height of our ctrl, we'll nudge it towards the center
|
||||
U32 nudge = (baseRect.extent.y - mProfile->mBitmapArrayRects[0].extent.y) / 2;
|
||||
baseRect.point.y += nudge;
|
||||
}
|
||||
// Render the fixed, filled in border
|
||||
renderFixedBitmapBordersFilled(baseRect, 3, mProfile );
|
||||
|
||||
|
|
@ -926,6 +932,12 @@ void GuiPopUpMenuCtrl::onRender( Point2I offset, const RectI &updateRect )
|
|||
// Do we render a bitmap border or lines?
|
||||
if ( mProfile->getChildrenProfile() && mProfile->mBitmapArrayRects.size() )
|
||||
{
|
||||
if (mProfile->mBitmapArrayRects[0].extent.y < baseRect.extent.y)
|
||||
{
|
||||
//if our bitmap is smaller than the height of our ctrl, we'll nudge it towards the center
|
||||
U32 nudge = (baseRect.extent.y - mProfile->mBitmapArrayRects[0].extent.y) / 2;
|
||||
baseRect.point.y += nudge;
|
||||
}
|
||||
// Render the fixed, filled in border
|
||||
renderFixedBitmapBordersFilled(baseRect, 2, mProfile );
|
||||
|
||||
|
|
@ -957,6 +969,12 @@ void GuiPopUpMenuCtrl::onRender( Point2I offset, const RectI &updateRect )
|
|||
// Do we render a bitmap border or lines?
|
||||
if ( mProfile->getChildrenProfile() && mProfile->mBitmapArrayRects.size() )
|
||||
{
|
||||
if (mProfile->mBitmapArrayRects[0].extent.y < baseRect.extent.y)
|
||||
{
|
||||
//if our bitmap is smaller than the height of our ctrl, we'll nudge it towards the center
|
||||
U32 nudge = (baseRect.extent.y - mProfile->mBitmapArrayRects[0].extent.y) / 2;
|
||||
baseRect.point.y += nudge;
|
||||
}
|
||||
// Render the fixed, filled in border
|
||||
renderFixedBitmapBordersFilled(baseRect, 1, mProfile );
|
||||
}
|
||||
|
|
@ -976,6 +994,12 @@ void GuiPopUpMenuCtrl::onRender( Point2I offset, const RectI &updateRect )
|
|||
// Do we render a bitmap border or lines?
|
||||
if ( !( mProfile->getChildrenProfile() && mProfile->mBitmapArrayRects.size() ) )
|
||||
{
|
||||
if (mProfile->mBitmapArrayRects[0].extent.y < baseRect.extent.y)
|
||||
{
|
||||
//if our bitmap is smaller than the height of our ctrl, we'll nudge it towards the center
|
||||
U32 nudge = (baseRect.extent.y - mProfile->mBitmapArrayRects[0].extent.y) / 2;
|
||||
baseRect.point.y += nudge;
|
||||
}
|
||||
drawUtil->drawRect( baseRect, mProfile->mBorderColorNA );
|
||||
}
|
||||
}
|
||||
|
|
@ -1095,6 +1119,13 @@ void GuiPopUpMenuCtrl::onRender( Point2I offset, const RectI &updateRect )
|
|||
// If we're rendering a bitmap border, then it will take care of the arrow.
|
||||
if ( !(mProfile->getChildrenProfile() && mProfile->mBitmapArrayRects.size()) )
|
||||
{
|
||||
if (mProfile->mBitmapArrayRects[0].extent.y < baseRect.extent.y)
|
||||
{
|
||||
//if our bitmap is smaller than the height of our ctrl, we'll nudge it towards the center
|
||||
U32 nudge = (baseRect.extent.y - mProfile->mBitmapArrayRects[0].extent.y) / 2;
|
||||
baseRect.point.y += nudge;
|
||||
}
|
||||
|
||||
// Draw a triangle (down arrow)
|
||||
S32 left = baseRect.point.x + baseRect.extent.x - 12;
|
||||
S32 right = left + 8;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue