Multiple pages in an app

Use this forum for:
- Discussion regarding unofficial CEGUI related tools, scripts and utilities.
- User to user help for the obsoleted CELayoutEditor and CEImagesetEditor tools.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Artial
Just popping in
Just popping in
Posts: 2
Joined: Thu Jul 28, 2005 15:43

Multiple pages in an app

Postby Artial » Thu Jul 28, 2005 15:56

We use multiple pages for our app (game). that can be done either by having an layout / xml per page, or a signle xml with a base windows per page.

We choose the latter ATM, because it makes less manipulation in code.

I tried the editor, and was faced with that pb : it's difficult to hide / show groups of components to work properly, because the property "visible" is written to true/false for the whole hierarchie. After that you need to re enable the visibility for every components!

Since hiding a window hides also all its children, the propertry don't need to be written for every (sub)children.

Why is that implemented recursively?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Multiple pages in an app

Postby CrazyEddie » Thu Jul 28, 2005 18:42

This is a side effect of the Properties system that the editors XML generation code relies upon.

I have been working on adding native XML writing support to the core cgeui systems, and this support can correctly work around these kinds of issues (and also enable things like the TabControl and MCL to generate correct XML for children and ColumnHeader properties respectively). This new XML writing code is in CVS, though I'm not sure if scriptkid will be using this support in the new editor or not.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Re: Multiple pages in an app

Postby scriptkid » Thu Jul 28, 2005 20:45

This is an interesting issue you have come up with. But since i have not debugged the code yet i'm not sure where you problem starts. Is the "visible" property propagated to its children when set, or does it happen when writing the layout?

Anyway, when new XML support is in CVS, i think i will add it to the new editor :-)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Multiple pages in an app

Postby CrazyEddie » Sat Jul 30, 2005 12:36

What it is, because when you do myWindow->isVisible() you get false returned if any ancestor of 'myWindow' is not visible, and since this is not the default, it gets written into XML.

So where you might have multiple component sheets where you hide a top-level parent, all child elements are also considered non-visible, though in normal use these children will 'recover' their true state when the parent is made visible again. Due to the fact that the properties isDefault method also accessed the setting via this same inherited value, it causes incorrect XML to be generated.

CVS-HEAD contains changes that fix these issues.

User avatar
Artial
Just popping in
Just popping in
Posts: 2
Joined: Thu Jul 28, 2005 15:43

Re: Multiple pages in an app

Postby Artial » Mon Aug 01, 2005 09:11

Great, now all is clear to me.

Having quite some sheets to produce, I'd vote for a show / hide button in the mail toolbar.

Anyway, thanks for the input.


Return to “Unofficial CEGUI-Related Tools”

Who is online

Users browsing this forum: No registered users and 8 guests