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?
Multiple pages in an app
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Multiple pages in an app
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.
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.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
- scriptkid
- 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
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
Anyway, when new XML support is in CVS, i think i will add it to the new editor
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Multiple pages in an app
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.
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.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Multiple pages in an app
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.
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