FrameWindow child area offset?

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

Lf3T-Hn4D
Just popping in
Just popping in
Posts: 3
Joined: Wed Mar 29, 2006 20:03

FrameWindow child area offset?

Postby Lf3T-Hn4D » Wed Mar 29, 2006 20:26

I'm using the Falagard skinning system.

Why is the offset of a child area at 0, 0?
Is there no way to set it to a given value?
I'm asking this because it's rather irritating to set a widget's top at 0 and get part of it hidden behind the titlebar of a FrameWindow.
Can't 0 be the position bellow the titlebar of a FrameWindow?

I think this offset problem is not very nice for applications that can run on multiple screen res.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Thu Mar 30, 2006 00:54

This is how the FrameWindow works atm. The titlebar is just a child window.
If you have a solution to the problem, then by all means tell us about it!

Lf3T-Hn4D
Just popping in
Just popping in
Posts: 3
Joined: Wed Mar 29, 2006 20:03

Postby Lf3T-Hn4D » Thu Mar 30, 2006 21:02

What I usually see most GUI engine does is to have two frames as a window.


Code: Select all

<frame>
  <titlebar /><closebutton />
  <childframe>
    <contents_goes_here />
  </childframe>
</frame>


I hope i'm making sense here. :P Not really sure how exactly CEGUI works. But I think this should be do-able.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Thu Mar 30, 2006 21:30

You can just add a DefaultWindow to the FrameWindow and manage it's size manually.

the FrameWindow getUnclippedInnerRect will return the area you're looking for in screen space and but using this in a event handler subscribed to the "Sized" event you can make sure the DefaultWindow is always exactly in the inner-rect area.

I 0.5 there is a new <AutoWindow element for XML layouts. This way you can create the inner frame from the looknfeel and "hook" into this from the XML layout.

Lf3T-Hn4D
Just popping in
Just popping in
Posts: 3
Joined: Wed Mar 29, 2006 20:03

Postby Lf3T-Hn4D » Fri Mar 31, 2006 06:31

ahh.. nice. Though that means i cannot have my GUI defined all in a file. Ah well... I guess that will have to do for now. Looks like 0.5 is going in the right direction. Can't wait for it to release. :)

Other than this problem, I think CEGUI is perfect. It's aready way better than others with it's layout engine. Though a XUL tyle layout would be nice. :wink: Great job guys. :)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests