[gcompris-devel] Delay code while playing gc_bonus_display animation
Bruno Coudoin
bruno.coudoin at free.fr
Thu Nov 5 07:30:02 UTC 2009
Le mercredi 04 novembre 2009 à 10:17 +0800, julien forgeat a écrit :
> Dear all,
>
> I have just started to code a simple activity and I am struggling a
> bit with gc_bonus_display.
Hi,
This is good news, what is your activity going to do ?
> I would like to have the execution of my code delayed while
> gc_bonus_display's animation is played, is there a standard GCompris
> way to do that?
Yes, there are plenty of examples in the code. If you are working in C,
look at the file erase.c for the function call:
timer_id = gtk_timeout_add (2000, (GtkFunction) finished, NULL);
Take care to properly delete the timer when the activity is closed with:
gtk_timeout_remove (timer_id);
> For reference, I am working with the source package from Ubuntu 9.04
> (so 8.4.4) and I am Julien_BLUG on IRC
May I suggest you to work on the development branch instead. I won't add
any new activity done on the 8.4 branch branch.
The 8.5 branch gcomprixogoo is based on the goocanvas and it is where
our future is.
http://gcompris.net/wiki/index.php/Developer%27s_corner
--
Bruno Coudoin
http://gcompris.net Free educational software for kids
http://toulibre.org Logiciel Libre à Toulouse
http://april.org Promouvoir et défendre le Logiciel Libre
More information about the Gcompris-devel
mailing list