Hello...
Is it possible to make a layout with 2 or or layout??..
For example: I have layout_1, layout_2 and layout_3 and I create a layout_4= layout_1 + layout_2 and another layout_5=layout_1+layout_3.
Salu2...
masch...
Sharing layout??
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Sharing layout??
Yes, but with the caveat that you need to avoid name clashes (maybe by use of a naming prefix).
You include a layout as content of a Window in another layout via the LayoutImport tag, which takes Filename, ResourceGroup and Prefix attributes.
Example:
and
Note that I believe CELayoutEditor is not currently aware of this system, so loading such a layout and resaving will result in different XML between the original and saved versions (the saved version will explicitly include all windows rather than use the imports).
CE.
You include a layout as content of a Window in another layout via the LayoutImport tag, which takes Filename, ResourceGroup and Prefix attributes.
Example:
Code: Select all
<GUILayout>
<Window Type="DefaultWindow" Name="layout_4_root">
<LayoutImport Filename="layout_1.layout" Prefix="layout_4_root/" />
<LayoutImport Filename="layout_2.layout" Prefix="layout_4_root/" />
</Window>
</GUILayout>
and
Code: Select all
<GUILayout>
<Window Type="DefaultWindow" Name="layout_5_root">
<LayoutImport Filename="layout_1.layout" Prefix="layout_5_root/" />
<LayoutImport Filename="layout_3.layout" Prefix="layout_5_root/" />
</Window>
</GUILayout>
Note that I believe CELayoutEditor is not currently aware of this system, so loading such a layout and resaving will result in different XML between the original and saved versions (the saved version will explicitly include all windows rather than use the imports).
CE.
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: Sharing layout??
CrazyEddie wrote:Note that I believe CELayoutEditor is not currently aware of this system, so loading such a layout and resaving will result in different XML between the original and saved versions (the saved version will explicitly include all windows rather than use the imports).
Yes, that's true. Thanks for the heads-up on this, i've raised a ticket:
http://www.cegui.org.uk/mantis/view.php?id=294
Check out my released snake game using Cegui!
Re: Sharing layout??
Great Eddie!....It's exactly what I need, but I like the hard way to do it, I use gedit to make the layout .
Thanks!...
Thanks!...
Re: Sharing layout??
I have working differents layout, but I have a problem with ZOrderChangeEnabled property. Is it possible that the property does not work between layout?? Because when I put the property in false and I do a mouse click to the parent layout, the child layout disappear.
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Re: Sharing layout??
I am not sure what exactly goes wrong, but a hierarchie in a layout is just relative. As soon as a layout is loaded, the concept of layout is lost in Cegui and Z ordering takes into account all currently windows in the WindowManager.
HTH.
HTH.
Check out my released snake game using Cegui!
Who is online
Users browsing this forum: No registered users and 8 guests