
I am creating a gui application using Ogre 1.2.4 and CEGUI 0.4.1. Right now, I have some sort of a simple script to create/set gui elements.
I have a number of pre-created buttons that the script can use, when I create these buttons I have to hide and disable them until a script uses them.
The problem is that I cant make these buttons visible again, I used ::show() ::activate() ::enable() ::moveToFront() and buttons are still not visible.
what could possible cause this?
Here is the button creation code:
Code: Select all
mButtonsWindow = CEGUI::WindowManager::getSingleton().createWindow(
(CEGUI::utf8*)"WindowsLook/FrameWindow", (CEGUI::utf8*)"RulesButtons_Window" );
mButtonsWindow->setAreaRect( CEGUI::Rect( 0.2, 0.9, 1, 1 ) );
mButtonsWindow->setProperty( "CloseButtonEnabled", "False" );
mButtonsWindow->setProperty( "DragMovingEnabled", "False" );
mButtonsWindow->setProperty( "TitlebarEnabled", "False" );
mButtonsWindow->setProperty( "SizingEnabled", "False" );
mButtonsWindow->setFont( mEngine->getGUIMgr()->getArialFont( 12 ) );
mWindow->addChildWindow( mButtonsWindow );
mButton1 = (CEGUI::PushButton*)CEGUI::WindowManager::getSingleton().createWindow(
(CEGUI::utf8*)"WindowsLook/Button", (CEGUI::utf8*)"RulesButton1_Button" );
mButton1->setPosition( CEGUI::Point( 0.01, 0.1 ) );
mButton1->setSize( CEGUI::Size( 0.23f, 0.8f ) );
mButton1->setText( "Button1" );
mButtonsWindow->addChildWindow( mButton1 );
mButton1->deactivate();
mButton1->hide();
and thank you very much