changeset 230:3e6da6f6a226

Call the button callback when the button is clicked
author wycc
date Wed, 17 Dec 2008 21:37:39 +0800
parents cc8dd16d8b6a
children 2637519e2bd7
files examples/dynamic/Makefile.am examples/dynamic/main.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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)
 {