Example for Tab Pane XML, please

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
zola
Quite a regular
Quite a regular
Posts: 48
Joined: Wed Jan 12, 2005 12:06

Example for Tab Pane XML, please

Postby zola » Wed Oct 06, 2004 09:02

Hi

This is really a noob question so forgive me if it seems too easy.

Please, could someone give an example on how to use a 'Taharez Tab Pane'?

I'm abit confused as to what has to be attached to what in thh layout XML

I do the following:

Code: Select all

Tab Pane
  -> Tab Button 1
            -> Window with the Tab content 2
  -> Tab Button 2
             -> Window with the Tab content 2


but this doesn't seem to work

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

Example for Tab Pane XML, please

Postby CrazyEddie » Wed Oct 06, 2004 09:22

I'll get back to you on this in a little while...

User avatar
zola
Quite a regular
Quite a regular
Posts: 48
Joined: Wed Jan 12, 2005 12:06

Example for Tab Pane XML, please

Postby zola » Wed Oct 06, 2004 09:37

:lol: not quite what I expected :)

Btw: When I load the Layout with the Tab Pane I get the error
GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'Taharez Tab Pane' objects.
But I do have the Tab Pane added in my WindowSet for TaharezLook.
And it also is added on the TLModule.cpp.
Strange?

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

Example for Tab Pane XML, please

Postby CrazyEddie » Wed Oct 06, 2004 09:49

:D

The Tab Pane thing is a bit strange, though you don't need to create those directly anyway :)

The following is an example of how to set this up:

Code: Select all

   <Window Type="DefaultGUISheet" Name="Demo">

      <Property Name="RelativeMaxSize" Value="w:1 h:1" />
      <Property Name="Size" Value="w:1 h:1" />

      <Window Type="Taharez Tab Control" Name="Demo/TabCtrl">
         <Property Name="RelativeMaxSize" Value="w:1 h:1" />
         <Property Name="Position" Value="x:0.25 y:0.1" />
         <Property Name="Size" Value="w:0.5 h:0.8" />

         <Window Type="DefaultGUISheet" Name="Demo/TabCtrl/Page1">
            <Property Name="Text" Value="Test Page 1" />

            <Window Type="Taharez Button" Name="Demo/TabCtrl/Page1/Button">
               <Property Name="RelativeMaxSize" Value="w:1 h:1" />
               <Property Name="Position" Value="x:0.1 y:0.2" />
               <Property Name="Size" Value="w:0.45 h:0.095" />
               <Property Name="Text" Value="Hello World" />
            </Window>

         </Window>

         <Window Type="DefaultGUISheet" Name="Demo/TabCtrl/Page2">
            <Property Name="Text" Value="Test Page 2" />

            <Window Type="Taharez Button" Name="Demo/TabCtrl/Page2/Button">
               <Property Name="RelativeMaxSize" Value="w:1 h:1" />
               <Property Name="Position" Value="x:0.3 y:0.4" />
               <Property Name="Size" Value="w:0.45 h:0.095" />
               <Property Name="Text" Value="Push Button" />
            </Window>

         </Window>
         <Window Type="DefaultGUISheet" Name="Demo/TabCtrl/Page3">
            <Property Name="Text" Value="Test Page 3" />
         </Window>

      </Window>

   </Window>


So basically, after creating the "Taharez Tab Control", you add children of type "DefaultGUISheet", which in turn contains the controls you want on that page. Set the text of the DefaultGUISheet to set the button label :)

HTH

CE.

User avatar
zola
Quite a regular
Quite a regular
Posts: 48
Joined: Wed Jan 12, 2005 12:06

Example for Tab Pane XML, please

Postby zola » Wed Oct 06, 2004 13:05

:) I see, quite different from what I was doing.
Thanks for the clarification.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 7 guests