I'm trying to create a .xml file using CELayoutEditor, and I have three questions:
1st - When I create a FrameWindow, what do I need to specify so that when I double click the header, all the widgets inside the FrameWindow "disappear" as well?
2nd - I created a DragContainer but when I release the mouse after moving it, it returns to its original position. The new position of the DragContainer is handled by CEGUI (like in a FrameWindow), or must I get the position where it was dropped and place it there myself?
3rd - Is there any simpler way to be able to position all the widgets in any position of the screen, during runtime, other than create a DragContainer as parent for each of the widgets?
Sorry for all this questions, and thanks in advance for any help provided
Three newbie questions
Moderators: CEGUI MVP, CEGUI Team
balizeiro wrote:First question solved. As if by magic it started working correctly
Found out what the magic was... If I set the DragMovingEnabled to true, the FrameWindow collapses all the widgets inside it by default, if I set it to false then the widgets don't collapse automaticaly. Maybe a bug?
No one knows the answer to any of the two other questions?
>> 1st - When I create a FrameWindow, what do I need to specify so that when I double click the header, all the widgets inside the FrameWindow "disappear" as well?
It seems to be "on" by default. The property you need is "RollUpEnabled", with a value of "True" or "False". However I'd think you'd need the titlebar to be enabled; not sure if it'd work if it was disabled.
>> 2nd - I created a DragContainer but when I release the mouse after moving it, it returns to its original position. The new position of the DragContainer is handled by CEGUI (like in a FrameWindow), or must I get the position where it was dropped and place it there myself?
Go through the posts in Need help with Drag and Drop for Wiki how-to, especially the Crazy Eddie posts; he listed code for a simple implementation of drag and drop. I've been forced off Cegui for far too long (doing two Java projects) but one day I'll have time to complete my work on drag and drop. Until then that code is the best implementation.
>> 3rd - Is there any simpler way to be able to position all the widgets in any position of the screen, during runtime, other than create a DragContainer as parent for each of the widgets?
If it's a FrameWindow you can simply drag the titlebar. Or do you mean by code? window->setPosition()
It seems to be "on" by default. The property you need is "RollUpEnabled", with a value of "True" or "False". However I'd think you'd need the titlebar to be enabled; not sure if it'd work if it was disabled.
>> 2nd - I created a DragContainer but when I release the mouse after moving it, it returns to its original position. The new position of the DragContainer is handled by CEGUI (like in a FrameWindow), or must I get the position where it was dropped and place it there myself?
Go through the posts in Need help with Drag and Drop for Wiki how-to, especially the Crazy Eddie posts; he listed code for a simple implementation of drag and drop. I've been forced off Cegui for far too long (doing two Java projects) but one day I'll have time to complete my work on drag and drop. Until then that code is the best implementation.
>> 3rd - Is there any simpler way to be able to position all the widgets in any position of the screen, during runtime, other than create a DragContainer as parent for each of the widgets?
If it's a FrameWindow you can simply drag the titlebar. Or do you mean by code? window->setPosition()
Rackle wrote:>> 3rd - Is there any simpler way to be able to position all the widgets in any position of the screen, during runtime, other than create a DragContainer as parent for each of the widgets?
If it's a FrameWindow you can simply drag the titlebar. Or do you mean by code? window->setPosition()
It's not necessarily a FrameWindow, it can be a button a editbox, etc...
There, better late than never: MovingAnyWindow. It's not perfect but is a step in the right direction.
Who is online
Users browsing this forum: No registered users and 27 guests