Dynamically changing a window's frame

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

adonf
Just popping in
Just popping in
Posts: 2
Joined: Fri Jan 26, 2007 11:08

Dynamically changing a window's frame

Postby adonf » 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:

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 !

Fenrir
Just popping in
Just popping in
Posts: 2
Joined: Sun Dec 10, 2006 13:25

Postby Fenrir » Wed Feb 07, 2007 16:07

I have the same question, I would like to dynamically change the backgroud image of a FrameWindow into my code.

Is it possible ? Thanks in advance for any help. :)

adonf
Just popping in
Just popping in
Posts: 2
Joined: Fri Jan 26, 2007 11:08

Postby adonf » Mon Feb 12, 2007 11:40

if by backgound image you meant the tiled frame then it's not supported by CEGUI 0.5

i don't think that changing the one-image background of a FrameWindow is supported either with WindowsLook or TaharezLook, you'll have to modify the existing loooknfeel files to add this feature.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 21 guests