[Solved] Static Text inside a FrameWindow

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

Dirso
Not too shy to talk
Not too shy to talk
Posts: 25
Joined: Sun Dec 31, 2006 15:49

[Solved] Static Text inside a FrameWindow

Postby Dirso » Fri Jan 05, 2007 22:28

Hi,

I'm making a simple dialog with two buttons, a caption and a text (question).

The dialog and the buttons work fine, but I don't know how to put a question inside the window (maybe a StaticText)? Could anyone provide me a sample code for this?

Code: Select all

// that's the code I create my dialog, how do I add a StaticText to it?
mWindow = (FrameWindow*)WindowManager::getSingleton().createWindow((utf8*)"WindowsLook/FrameWindow", basename+"/Window" );
parentwin->addChildWindow( mWindow );
mWindow->setCloseButtonEnabled(false);
mWindow->setSizingEnabled(false);
mWindow->setCaptionColour( CEGUI::colour(0.8,0.8,0.8) );
mWindow->setSize( Size(0.4,0.2) );
mWindow->setPosition( Point(0.3,0.4) );


Thanks a lot!
Dirso.

Dirso
Not too shy to talk
Not too shy to talk
Posts: 25
Joined: Sun Dec 31, 2006 15:49

Postby Dirso » Fri Jan 05, 2007 22:41

mText = (StaticText*)WindowManager::getSingleton().createWindow((utf8*)"WindowsLook/StaticText", basename+"/S1");
mText->setBackgroundEnabled(false);
mText->setFrameEnabled(false);
mWindow->addChildWindow( mText );


Return to “Help”

Who is online

Users browsing this forum: No registered users and 18 guests