mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-18 06:03:48 +00:00
Initial WIP of the Modern Editor Layout
This commit is contained in:
parent
d8dc07ee2d
commit
8605c3115d
63 changed files with 1082 additions and 0 deletions
|
|
@ -613,3 +613,25 @@ void GuiSplitContainer::onMouseDragged( const GuiEvent &event )
|
|||
solvePanelConstraints(newDragPos, firstPanel, secondPanel, clientRect);
|
||||
}
|
||||
}
|
||||
|
||||
void GuiSplitContainer::setSplitPoint(Point2I splitPoint)
|
||||
{
|
||||
GuiContainer *firstPanel = dynamic_cast<GuiContainer*>(at(0));
|
||||
GuiContainer *secondPanel = dynamic_cast<GuiContainer*>(at(1));
|
||||
|
||||
// This function will constrain the panels to their minExtents and update the mSplitPoint
|
||||
if (firstPanel && secondPanel)
|
||||
{
|
||||
RectI clientRect = getClientRect();
|
||||
|
||||
solvePanelConstraints(splitPoint, firstPanel, secondPanel, clientRect);
|
||||
|
||||
layoutControls(clientRect);
|
||||
}
|
||||
}
|
||||
|
||||
DefineEngineMethod(GuiSplitContainer, setSplitPoint, void, (Point2I splitPoint), ,
|
||||
"Set the window's collapsing state.")
|
||||
{
|
||||
object->setSplitPoint(splitPoint);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue