StaticImage in code [solved]
Posted: Tue Aug 29, 2006 20:08
I've been screwing around with integrating Ogre, OIS and CEGUI. I'm experimenting with different methods of creating widgets and have been successful using types defined in the TaharezLook scheme. I'd now like to try subscribing some handlers to a StaticImage, but cannot get the StaticImage itself to display. Here is the relevant code.
pTex is TexturePtr to a valid Ogre texture.
Thanks in advance
pTex is TexturePtr to a valid Ogre texture.
Code: Select all
CEGUI::StaticImage * statImage = (CEGUI::StaticImage *)guiWindowMgr.createWindow("TaharezLook/StaticImage", "testImage");
CEGUI::Texture* testTex = guiRenderer->createTexture(pTex);
CEGUI::Imageset* rttImageSet = CEGUI::ImagesetManager::getSingleton().createImageset((CEGUI::utf8*)"RttImageset",testTex);
rttImageSet->defineImage((CEGUI::utf8*)"BonusImage",
CEGUI::Point(CEGUI::Vector2(0,0)),
CEGUI::Size(testTex->getWidth(), testTex->getHeight()),
CEGUI::Point(CEGUI::Vector2(0,0)));
statImage->setImage("RttImageset", "BonusImage");
Thanks in advance