Is there any support for a sort of "animated image" like a compass for example? Taking an example from EQ, the compass is just a single strip image that scrolls back and forth, or in a loop, depending on your direction, I am curious if CEGUI has any implentation of somthing like this yet or if it needs to be designed.
Thanks Much.
Compass Strip Example.
EDIT: After doing a little research I find that Eq loads the same image twice, i.e. two instances of the compass strip, like so:
My question would now be more so. Does CEGUI have any support for creating an overlay ontop of the image, and is there anyway yet to have them in a sort of "scrolling" effect, or perhaps how to tell what part of the image is showing.. if you understand what i mean...
Thanks again for any suggestions.
Animated images.
Moderators: CEGUI MVP, CEGUI Team
Re: Animated images.
There are widgets that do this, the ScrollablePane is a perfect example.
Try this. Create a window of a small size and then put that long static image into it as child. The smaller parent's clipping size should mean that the child image gets cropped to a subset, and then by moving the child position around you should get the desired result.
Try this. Create a window of a small size and then put that long static image into it as child. The smaller parent's clipping size should mean that the child image gets cropped to a subset, and then by moving the child position around you should get the desired result.
Re: Animated images.
Thanks for the reply but for some odd reason when i load the image it gets all distorted =/.
Here is the code used to load the static img.
Thanks again for the help.
Here is the code used to load the static img.
Code: Select all
CEGUI::Texture* stctex = this->slOgreRenderer->createTexture("compass.jpg");
CEGUI::Imageset* rttImageSet = CEGUI::ImagesetManager::getSingleton().createImageset("CompassImg",stctex);
rttImageSet->defineImage("compassStrip",Point(0.0f,0.0f),Size(355,20),Point(0.0,0.0));
StaticImage* simg = (StaticImage*)wMgr.createWindow((utf8*)"TaharezLook/StaticImage", (utf8*)"Demo7/Window2/Image1");
console->addChildWindow(simg);
//simg->setAlpha(0.750000);
simg->setMaximumSize(Size(1.0f, 1.0f));
simg->setPosition(Point(0.56f, 0.35f));
simg->setSize(Absolute ,Size(355, 20));
simg->setFrameEnabled(false);
simg->setBackgroundEnabled(false);
simg->setImage((utf8*)"CompassImg",(utf8*)"compassStrip");
Thanks again for the help.
Re: Animated images.
Wierd. You might have to step into the library code and have a look at what its doing with the abs_rect structures and the like. I'm not sure why it would squash it like that.
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 3 guests