Help and discussion regarding skinning, themes, and other artistic content.

Moderators: CEGUI MVP, CEGUI Team

Just popping in
Just popping in
Posts: 1
Joined: Mon Jul 14, 2008 08:29


Postby dave2k » Mon Jul 14, 2008 08:41

i got a window rendered using this theme, but it doesn't display text. Why is this? I am new to this project so i don't know where to begin looking on this one...

My code to initialise the gui is below:

Code: Select all

   try {
   CEGUI::OpenGLRenderer* myRenderer = new CEGUI::OpenGLRenderer( 0 );
   new CEGUI::System( myRenderer );

   using namespace CEGUI;
   WindowManager& wmgr = WindowManager::getSingleton();
   CEGUI::SchemeManager::getSingleton().loadScheme( "SleekSpace.scheme" );
   // load in a font.  The first font loaded automatically becomes the default font.
   //if(! CEGUI::FontManager::getSingleton().isFontPresent( "Commonwealth-10" ) )
   //   CEGUI::FontManager::getSingleton().createFont( "Commonwealth-10.font" );
   //System::getSingleton().setDefaultFont( "Commonwealth-10" );
   Window* myRoot = wmgr.createWindow( "DefaultWindow", "root" );
   System::getSingleton().setGUISheet( myRoot );
   FrameWindow* fWnd = (FrameWindow*)wmgr.createWindow( "SleekSpace/FrameWindow", "testWindow" );
   myRoot->addChildWindow( fWnd );
   // position a quarter of the way in from the top-left of parent.
   fWnd->setPosition( UVector2( UDim( 0.25f, 0 ), UDim( 0.25f, 0 ) ) );

   // set size to be half the size of the parent
   fWnd->setSize( UVector2( UDim( 0.5f, 0 ), UDim( 0.5f, 0 ) ) );
   fWnd->setText( "Hello World!" );
   } catch (CEGUI::Exception e) {
      string s = e.getMessage().c_str();


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

Postby CrazyEddie » Tue Jul 15, 2008 08:30

Hi, and welcome :)

Are you sure you're loading a font? I see in the code snippet those lines are commented; if the scheme also does not load a font, this will be the reason for the lack of text ;)


Return to “Skins and Themes”

Who is online

Users browsing this forum: No registered users and 2 guests