Three newbie questions

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

balizeiro
Just popping in
Just popping in
Posts: 7
Joined: Thu Apr 26, 2007 21:46

Three newbie questions

Postby balizeiro » Wed Aug 22, 2007 21:53

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
:wink:

balizeiro
Just popping in
Just popping in
Posts: 7
Joined: Thu Apr 26, 2007 21:46

Postby balizeiro » Sun Aug 26, 2007 20:22

First question solved. As if by magic it started working correctly :?

If someone could help me or guide me into a way to answer those other two questions, it would be perfect ;)

balizeiro
Just popping in
Just popping in
Posts: 7
Joined: Thu Apr 26, 2007 21:46

Postby balizeiro » Tue Aug 28, 2007 16:29

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? :roll:

No one knows the answer to any of the two other questions? :oops:

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Tue Aug 28, 2007 20:28

>> 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()

balizeiro
Just popping in
Just popping in
Posts: 7
Joined: Thu Apr 26, 2007 21:46

Postby balizeiro » Tue Aug 28, 2007 21:16

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...

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Wed Aug 29, 2007 14:07

I'm not seeing an easy way to accomplish this.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Wed Sep 12, 2007 18:13

There, better late than never: MovingAnyWindow. It's not perfect but is a step in the right direction.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 9 guests