Nothing happens in AnimationPicture

Started by tueda, 30 October 2013, 07:37:18


I always see the first picture forever.
What's wrong?

   var pic = gui.Add (new AnimatedPicture ());
   pic.AddFrame ("media/Face-Ako.png", 1000);
   pic.AddFrame ("media/Face-Bko.png", 1000);
   pic.AddFrame ("media/Face-Cko.png", 1000);
   pic.SetFrame (0);
   pic.Play ();

I used TGUI.Net-Master (latest development snapshot).


Strange, it works fine for me. The animation of course stops at the last frame because it isn't looping, but at least I have an animation.

I'll look into this later today, because I don't really know what version I tested it with, so there is always the chance that I'm not using the same version as you.


I understood what happened.
GUI.m_Focused was false when I started my application.
Thus AnimatedPicture.OnUpdate() was never called.
Next I clicked another window(lost focus) and clicked my application again (gain focus).
GUI.m_Focuesed became true and it started to animate.

I'm not sure why GUI.m_Focused was false when I started.
(Application window has focus certainly)


Thanks for investigating on the bug.

I made the m_Focused variable default to false, because in all my tests a focused event would be send when creating the window.

Anyway, I now changed the default value to true, so it should now work with the latest version.


Thank you. It works fine.
And sorry, this question should be written in Help forum.