Page 1 of 1

More Upgrading issues (0.4 -> 0.5)

Posted: Wed Feb 14, 2007 20:54
by Dirso
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

Posted: Fri Feb 16, 2007 12:38
by mba
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