More Upgrading issues (0.4 -> 0.5)

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

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

More Upgrading issues (0.4 -> 0.5)

Postby Dirso » Wed Feb 14, 2007 20:54

Hi,

I have so many compile errors that I really don't know what to do!
Could anyone help me upgrading this code?

Code: Select all

PushButton* mButton;
FrameWindow* mWindow;
StaticText* mText;

mButton = (PushButton*)WindowManager::getSingleton().createWindow((utf8*)"WindowsLook/Button", name );
mButton->setText( text );
mButton->setNormalTextColour( colour(0.8,0.8,0.8) );
mButton->setHoverTextColour( colour(1,1,1) );
mButton->setPushedTextColour( colour(1,0.3,0.3) );

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) );

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


Thank you very much,
Dirso

User avatar
mba
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Tue Oct 11, 2005 11:54
Location: Denmark

Postby mba » Fri Feb 16, 2007 12:38

Hi Dirso

First of all I think you should supply some of/all the compile errors you see.
Second the release notes has been an invaluable information resource to me when I upgraded from 0.4.1 to 0.5.0
http://www.cegui.org.uk/wiki/index.php/ ... otes_0.5.X

The only thing that I can see off the top of my head is the static text class has been replaced with a standard Window so
StaticText* mText;
should be
Window* mText;
And then you should use the property system for changing properties of the static text element.


Kind regards
Martin


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 8 guests