How to render Animate Image in CEGUI 0.7.1
Posted: Wed Mar 31, 2010 09:23
by hitjack
as we all know in the new version CEGUI support RenderedString, we can rendering Text and Image or Widget With RenderedStringComponent
What can I do,to support Animate Image.
for example a series image in a queue, rendering those in each frame.
thx~
Re: How to render Animate Image in CEGUI 0.7.1
Posted: Thu Apr 01, 2010 08:53
by CrazyEddie
As you probably know, CEGUI does not currently support animation directly, so any solution will involve writing something yourself.
To have such a thing as part of a RenderedString could be somewhat challenging. You'd need a RenderedStringComponent subclass of course, you'd need some means of parsing a tag for that in text strings (unless you're constructing the RenderedString by hand), and key to the whole thing is finding some way of passing timing data to the component that's drawing the animation frames - so you might need to track all of the animation components some how in order to pass in timing information. Additionally you might need a means to inform that it's time to redraw, so maybe those components could be either an event set of an event which you could fire in order that some handler can trigger redraws.
So, nothing built in, but perhaps possible with some amount of effort.
CE.