What is the correct way to size a framewindow and size/position its contents to account for the size of the TitleBar and the Frame? If I place a child of the framewindow at Left/Top = CEGUI::UDim(0.0, 0)/CEGUI::UDim(0.0, 0) this will overlap the TitleBar. Also if I set the size of the framewindow to be equal to the total size of all its children I will actually see the framewindow overlap the children. So I need to set the FrameWindow height to be the height of the children plus the height of the titlebar. Is there an easy way to handle these kinds of things?
Can someone please point me to some sample code that will deal with size/placement of the framewindow children, and the size of the framewindow in a fashion that does not have the titlebar interfere with other children of the frame?
Thanks in advance.
FrameWindow Sizing
Moderators: CEGUI MVP, CEGUI Team
You could query the auto created child TitleBar of a FrameWindow and offset your widgets accordingly. Something like:
Naturally this won't compile and I'm bound to have used the wrong functions, especially that getChildItem().
Code: Select all
myFrameWindow = createWindow();
myTitlebar = myFrameWindow->getChildItem("TitleBar");
URect titlebarArea= myTitlebar->getArea();
myFirstWidget = createWindow();
myFirstWidget->setPosition( the Y coordinate is based on URect.yBottom or URect.height);
Naturally this won't compile and I'm bound to have used the wrong functions, especially that getChildItem().
Who is online
Users browsing this forum: Baidu [Spider] and 4 guests