This is the code I'm using:
Code: Select all
CEGUI::Texture* texturePtr = CEGUI::System::getSingletonPtr()->getRenderer()->createTexture("menubuttons.jpg","Data/Media/Menu");
CEGUI::Imageset* ButtonsImageset = CEGUI::ImagesetManager::getSingletonPtr()->createImageset("Buttons", texturePtr);
ButtonsImageset->defineImage("ButtonUp", CEGUI::Point(0.0f,0.0f), CEGUI::Size( 0.5f, 0.5f ), CEGUI::Point(0.0f,0.0f));
ButtonsImageset->defineImage("ButtonDown", CEGUI::Point(0.0f,0.5f), CEGUI::Size( 0.5f, 0.5f ), CEGUI::Point(0.0f,0.0f));
CEGUI::RenderableImage *bleh = new CEGUI::RenderableImage();
CEGUI::RenderableImage *bleh2 = new CEGUI::RenderableImage();
bleh->setImage( &ButtonsImageset->getImage("ButtonUp") );
bleh2->setImage( &ButtonsImageset->getImage("ButtonDown") );
CEGUI::PushButton *button = (CEGUI::PushButton *)CEGUI::WindowManager::getSingletonPtr()->createWindow("TaharezLook/Button", (CEGUI::utf8*)name);
button->setStandardImageryEnabled(false);
button->setCustomImageryAutoSized(true);
button->setNormalImage( bleh );
button->setHoverImage( bleh2 );
button->setPushedImage( bleh2 );
Nothing shows up, just the text. If I don't set setStandardImageryEnable() the button looks like it normaly would.
What am I doing wrong?