Multiple Children

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
tonyhnz
Just popping in
Just popping in
Posts: 12
Joined: Wed Jan 12, 2005 12:06

Multiple Children

Postby tonyhnz » Tue Jul 05, 2005 02:21

I have the following XML layout ..

Code: Select all

<?xml version="1.0" ?>
<GUILayout>

<Window Type="TaharezLook/FrameWindow" Name="/Chat">
   <Property Name="Position" Value="x:0.0 y:0.0" />
   <Property Name="Size" Value="w:0.25 h:0.25" />
   <Property Name="Alpha" Value="0.6" />
   <Window Type="DefaultWindow" Name="/Chat/Wnd">
        <Property Name="InheritsAlpha" Value="True" />
      <Property Name="Position" Value="x:0.0 y:0.00" />
      <Property Name="Size" Value="w:1 h:1" />
      <Window Type="TaharezLook/Listbox" Name="/Chat/Wnd/List">
         <Property Name="Position" Value="x:0.0 y:0.1" />
         <Property Name="Size" Value="w:1 h:0.77" />
           <Property Name="InheritsAlpha" Value="True" />
         <Property Name="ReadOnly" value = "True" />
      /Window>
       <Window Type="TaharezLook/Editbox" Name="/Chat/Wnd/Edit" >
         <Property Name="Position" Value="x:0.01 y:0.87" />
         <Property Name="Size" Value="w:0.98 h:0.12" />
           <Property Name="InheritsAlpha" Value="True" />
      /Window>
   </Window>
</Window>
</GUILayout>


Now I wanted /Chat/Wnd/Edit to be also be a child of /Chat/Wnd - instead it gets attached to /Chat/Wnd/List.
I have worked around it in the code for now but is there a way to set it correctly from the xml ?

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

Re: Multiple Children

Postby CrazyEddie » Tue Jul 05, 2005 07:48

Hi,

your closing </Window> tags are missing the '<' so each window block is not terminated correctly, causing subsequent window to be added to the wrong place.

Since validation did not catch it, I guess you're using tinyXML, right? :)

User avatar
tonyhnz
Just popping in
Just popping in
Posts: 12
Joined: Wed Jan 12, 2005 12:06

Re: Multiple Children

Postby tonyhnz » Tue Jul 05, 2005 13:51

Yes i am using tinyxml. I looked and looked at the xml and never noticed the missing '<'.
Needed a second set of eyes to spot the obvious.

I have got the basics of the chat box working pretty well - you press enter in the edit box and the text appears in listbox above. Also have it scrolling the list lines up - it was pretty straight forward to code.
I am in process of adding code to wiki.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 12 guests