# HG changeset patch # User wycc # Date 1229521059 -28800 # Node ID 3e6da6f6a2261fd36d68fa0edb20a24aed4124e1 # Parent cc8dd16d8b6aeaba7e5882d5ceb48f2268c18202 Call the button callback when the button is clicked diff -r cc8dd16d8b6a -r 3e6da6f6a226 examples/dynamic/Makefile.am --- a/examples/dynamic/Makefile.am Wed Dec 17 21:18:44 2008 +0800 +++ b/examples/dynamic/Makefile.am Wed Dec 17 21:37:39 2008 +0800 @@ -1,6 +1,6 @@ include $(top_srcdir)/config.mk -noinst_PROGRAMS = dynamic +noinst_PROGRAMS = dynamic button.so EXTRA_DIST = menu.svg button.svg dynamic_SOURCES = main.c diff -r cc8dd16d8b6a -r 3e6da6f6a226 examples/dynamic/main.c --- a/examples/dynamic/main.c Wed Dec 17 21:18:44 2008 +0800 +++ b/examples/dynamic/main.c Wed Dec 17 21:37:39 2008 +0800 @@ -118,6 +118,8 @@ mb_progm_free_completed(progm); get_now(&now); mb_progm_start(progm, X_MB_tman(en->rt), &now); + if (btn->press) + btn->press(btn->arg); } mb_button_t *mb_button_new(engine_t *en,mb_sprite_t *sp, char *name) {