# HG changeset patch # User wycc # Date 1236234719 -28800 # Node ID 0f0a3da113908151918b8cb4baffc301876e40b8 # Parent 33e8ff8b7ad2605b8fa699383bd9cd7ed4ca177e# Parent c1afd14caa85a0fc07d85cb71de85516385917d7 merge diff -r c1afd14caa85 -r 0f0a3da11390 examples/menu/animated_menu.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/menu/animated_menu.h Thu Mar 05 14:31:59 2009 +0800 @@ -0,0 +1,29 @@ +#ifndef __ANIMATED_MENU_H +#define __ANIMATED_MENU_H +typedef struct _mb_animated_menu { + char **titles; + int *menus_y; + int *items; + int top; + int cur; + int max; + int ready; + int speed; + MBApp *app; + mb_sprite_t *sprite; + mb_obj_t **objects; + mb_obj_t *lightbar; + void (*callback)(struct _mb_animated_menu *m, int sel); +} mb_animated_menu_t; +/** \brief Create an instace of animated menu. + * + * The objectnames is used to extract symbols from the SVG file. + * ${objectnames}0 - ${objectnames}8 is the text object. + * ${objectnames}_lightbar is the lightbar. + * + */ +mb_animated_menu_t *mb_animated_menu_new(MBApp *app,mb_sprite_t *sp,char *objnames,char *menus[]); +void mb_animated_menu_set_speed(mb_animated_menu_t *m,int speed); +int mb_animated_menu_get_speed(mb_animated_menu_t *m); +void mb_animated_menu_set_callback(mb_animated_menu_t *m, void (*f)(mb_animated_menu_t *m, int sel)); +#endif