Dynamically changing a window's frame
Posted: Fri Jan 26, 2007 12:03
Hi,
I'm trying to adapt an Ogre sample from CEGUI version 0.4 to 0.5 and I'm stuck on a call to StaticText::setFrameImages() like this:
where TopLeft, TopRight, etc are image names inside ImageSet set
In CEGUI 0.5 StaticText was replaced by Window that doesn't have the setFrameImages method. I found quite a bit of sample code on how to dynamically change a Button object's texture, but not the frame.
I thought that I coul to use the same method as Crazy Eddie suggested here but the ImageProperty tag can only be used inside an ImageComponent and not a FrameComponent (FalagardSkinning.pdf page 74).
Is there a way to do what I want ? I'm sure there are workarounds to get the Ogre sample to work, like creating another widget type, but I'm going to need this in my own project, so it's important for me that the user can select any set of images as a frame.
Thanks !
I'm trying to adapt an Ogre sample from CEGUI version 0.4 to 0.5 and I'm stuck on a call to StaticText::setFrameImages() like this:
Code: Select all
StaticText* panel = (StaticText*)WindowManager::getSingleton().createWindow("WindowsLook/StaticText", "Panel 1"); "Panel 1");
panel->setFrameImages(
&set->getImage(TopLeft), &set->getImage(TopRight),
&set->getImage(BottomLeft), &set->getImage(BottomRight),
&set->getImage(Left), &set->getImage(Top),
&set->getImage(Right), &set->getImage(Bottom) );
where TopLeft, TopRight, etc are image names inside ImageSet set
In CEGUI 0.5 StaticText was replaced by Window that doesn't have the setFrameImages method. I found quite a bit of sample code on how to dynamically change a Button object's texture, but not the frame.
I thought that I coul to use the same method as Crazy Eddie suggested here but the ImageProperty tag can only be used inside an ImageComponent and not a FrameComponent (FalagardSkinning.pdf page 74).
Is there a way to do what I want ? I'm sure there are workarounds to get the Ogre sample to work, like creating another widget type, but I'm going to need this in my own project, so it's important for me that the user can select any set of images as a frame.
Thanks !