Page 1 of 1

Renaming root windows?

Posted: Fri Jan 02, 2009 12:46
by dmail
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

Posted: Fri Jan 02, 2009 12:59
by Pompei2
No, this should not happen. At least this doesn't happen in my game. You have to rename them yourself if you want this.

Posted: Fri Jan 02, 2009 13:11
by dmail
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

Posted: Fri Jan 02, 2009 13:39
by CrazyEddie
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.

Posted: Fri Jan 02, 2009 14:31
by dmail
Thanks for the info and link Eddy