LayoutImport does not work.

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

Nudel
Just popping in
Just popping in
Posts: 5
Joined: Fri Jul 14, 2006 13:56

LayoutImport does not work.

Postby Nudel » Sun Nov 26, 2006 14:40

Im trying to import a layout file into another with layout import, but i allways get this error(CEGUI.log)

Code: Select all

26/11/2006 15:33:41 (Error)   Exception: FontManager::getFont - A Font object with the specified name 'Commonwealth-10' does not exist within the system
26/11/2006 15:33:41 (Error)   Exception: FontManager::getFont - A Font object with the specified name 'Commonwealth-10' does not exist within the system
26/11/2006 15:33:42 (Error)   Exception: FontManager::getFont - A Font object with the specified name 'Commonwealth-10' does not exist within the system
26/11/2006 15:33:42 (Error)   Exception: WindowManager::loadWindowLayout - Filename supplied for gui-layout loading must be valid.
26/11/2006 15:33:42 (Error)   Exception: GUILayout_xmlHandler::startElement - layout loading aborted due to imported layout load failure (see error(s) above).


According to the error, the file name is wrong. This is the code im using to import a layout:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<GUILayout>
  <Window Type="DefaultWindow" Name="root" >
    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />

    <LayoutImport>
      <Property Filename="about.layout"/>
    </LayoutImport>
   
  </Window>
</GUILayout>

Did i use layoutImport wrong? I didnt find any example of layoutimport so im not sure.
The Filename is correct. Using "WindowManager::getSingleton().loadWindowLayout("about.layout");" in c++ works.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Sun Nov 26, 2006 15:48

It should be:

Code: Select all

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

    <LayoutImport Filename="about.layout" />
   
  </Window>
</GUILayout>


HTH

Nudel
Just popping in
Just popping in
Posts: 5
Joined: Fri Jul 14, 2006 13:56

Postby Nudel » Sun Nov 26, 2006 15:53

thank you, worked. :D


Return to “Help”

Who is online

Users browsing this forum: No registered users and 19 guests