Renaming root windows?

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

dmail
Quite a regular
Quite a regular
Posts: 46
Joined: Mon Nov 27, 2006 16:49

Renaming root windows?

Postby dmail » Fri Jan 02, 2009 12:46

Why when I load a layout does CEGUI rename the root window no matter what its name is by prefixing it with a number?
So a layout with root named foo_root becomes 0_foo_root? I could understand this if names clashed but not otherwise.
Thanks

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Fri Jan 02, 2009 12:59

No, this should not happen. At least this doesn't happen in my game. You have to rename them yourself if you want this.

dmail
Quite a regular
Quite a regular
Posts: 46
Joined: Mon Nov 27, 2006 16:49

Postby dmail » Fri Jan 02, 2009 13:11

This is happening with version 0.6.1 ( I have not moved to 0.6.2 as it is a modified version).
snippet from layout

<?xml version="1.0" encoding="UTF-8"?>

<GUILayout >
<Window Type="DefaultWindow" Name="file_root" >
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />


snippet from log
02/01/2009 12:42:26 (Info) ---- Beginning loading of GUI layout from 'file_search.layout' ----
02/01/2009 12:42:26 (Info) Window '1_file_root' of type 'DefaultWindow' has been created.
02/01/2009 12:42:26 (Info) Window '1_file_root/file_explorer' of type 'SleekSpace/FrameWindow' has been created.


names from dump window names
02/01/2009 13:09:57 (Std) WINDOW NAMES DUMP (BEFORE FRAME DELETION)
02/01/2009 13:09:57 (Std) -----------------
02/01/2009 13:09:57 (Std) Window : 1_file_root

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

Postby CrazyEddie » Fri Jan 02, 2009 13:39

Hi,

You are likely being affected by this issue: http://www.cegui.org.uk/mantis/view.php?id=236

Theoretically, something like this should be the work-around, but I suspect it actually will not make any difference:

Code: Select all

winMgr.loadWindowLayout("mylayout.layout", false);

You'll probably end up with something like:

Code: Select all

winMgr.loadWindowLayout("mylayout.layout", CEGUI::String(""));

which is essentially the work around documented in the mantis ticket and also in the newer docs.

If neither of the above work, then I do not think there is a work-around, unless you count manually renaming the windows back to what they should have been(!)

I'll refrain from ranting about how this particular disaster came about.

CE.

dmail
Quite a regular
Quite a regular
Posts: 46
Joined: Mon Nov 27, 2006 16:49

Postby dmail » Fri Jan 02, 2009 14:31

Thanks for the info and link Eddy


Return to “Help”

Who is online

Users browsing this forum: No registered users and 15 guests