How to apply the animation of gif pic in the MouseCursor?

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

ogre2012
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Wed Mar 23, 2011 07:55

How to apply the animation of gif pic in the MouseCursor?

Postby ogre2012 » Thu Mar 24, 2011 05:45

I have made the animation true from the gif picture.
the specific procedure as following:
http://www.cegui.org.uk/phpBB2/viewtopic.php?f=2&t=5102#p26202
Now, I meet two questions.
1. But I don't know how to use it in the system MouseCursor.
Because in Cegui the MouseCursor is not a Window.

2. How to expediently use the animation with a Tag. Like the following

Code: Select all

 CEGUI::Window* textComponent;
                .......
         textComponent->setText("\n[colour='FF842B00'] Hello [font='Arial-Bold-10'] ABC123 [font='Arial-Italic-10'] ABC123 [font='Arial-BoldItalic-10'] ABC123 [font='Arial-10'] ABC123 ");

Somebody help me about it.
Thank you very much!

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: How to apply the animation of gif pic in the MouseCursor

Postby Kulik » Thu Mar 24, 2011 16:40

MouseCursor is sadly not a PropertySet (maybe in 0.8) so you can't animate it easily. I think you will need to use custom code for that.

I don't understand the second question, could you please provide further description of what you want to achieve?

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: How to apply the animation of gif pic in the MouseCursor

Postby Jamarr » Thu Mar 24, 2011 17:36

ogre2012 wrote:1. But I don't know how to use it in the system MouseCursor.
Because in Cegui the MouseCursor is not a Window.


One way to work around this would be to hide the default mouse cursor and manually move a window around with the cursor. Note that you should still continue to inject mouse movement so that hover and other effects still work.

2. How to expediently use the animation with a Tag. Like the following

Code: Select all

 CEGUI::Window* textComponent;
                .......
         textComponent->setText("\n[colour='FF842B00'] Hello [font='Arial-Bold-10'] ABC123 [font='Arial-Italic-10'] ABC123 [font='Arial-BoldItalic-10'] ABC123 [font='Arial-10'] ABC123 ");


I think he wants to setup an animation where the text color and font changes?
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: How to apply the animation of gif pic in the MouseCursor

Postby Kulik » Sat Mar 26, 2011 20:23

Doing the text animation via string interpolator with discrete progression will be slow I think. But perhaps it's usable for short text.

We have to add some code to 0.8 if we want to make this work faster and more convenient.

User avatar
spracle
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Tue Aug 24, 2010 07:29

Re: How to apply the animation of gif pic in the MouseCursor

Postby spracle » Mon Mar 28, 2011 03:34

You can use window's cursor instead of CEGUI' cursor.
A picture of .ani (or .cur) can be animated

ogre2012
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Wed Mar 23, 2011 07:55

Re: How to apply the animation of gif pic in the MouseCursor

Postby ogre2012 » Mon Mar 28, 2011 10:30

spracle wrote:You can use window's cursor instead of CEGUI' cursor.
A picture of .ani (or .cur) can be animated


if I use the window's cursor, I can't get the events when the window's cursor goes through
the cegui's window or other conditions. That is to say the cegui's window wil be disabled.

User avatar
spracle
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Tue Aug 24, 2010 07:29

Re: How to apply the animation of gif pic in the MouseCursor

Postby spracle » Mon Mar 28, 2011 15:24

if I use the window's cursor, I can't get the events when the window's cursor goes through
the cegui's window or other conditions. That is to say the cegui's window wil be disabled.


No,You just hide CEGUI's cursor(don't render it),so you can still get events, :D


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests