Mercurial > MadButterfly
annotate include/mb_ani_menu.h @ 710:c93381320d6e
Fill shapes with black if with out any stroke and fill in the style
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Fri, 13 Aug 2010 18:23:44 +0800 |
parents | 26c302b47de1 |
children | 586e50f82c1f |
rev | line source |
---|---|
456
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
1 #ifndef __ANIMATED_MENU_H |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
2 #define __ANIMATED_MENU_H |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
3 typedef struct _mb_animated_menu { |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
4 char **titles; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
5 int *menus_y; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
6 int *items; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
7 int top; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
8 int cur; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
9 int max; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
10 int ready; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
11 int speed; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
12 mbaf_t *app; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
13 mb_sprite_t *sprite; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
14 mb_obj_t **objects; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
15 mb_obj_t *lightbar; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
16 void (*callback)(struct _mb_animated_menu *m, int sel); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
17 void (*update_callback)(struct _mb_animated_menu *m, int sel); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
18 mb_progm_t *progm; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
19 X_kb_event_t pending_keys[16]; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
20 int pending_pos, pending_last; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
21 } mb_animated_menu_t; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
22 /** \brief Create an instace of animated menu. |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
23 * |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
24 * The objectnames is used to extract symbols from the SVG file. |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
25 * ${objectnames}0 - ${objectnames}8 is the text object. |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
26 * ${objectnames}_lightbar is the lightbar. |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
27 * |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
28 */ |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
29 mb_animated_menu_t *mb_animated_menu_new(mbaf_t *app,mb_sprite_t *sp,char *objnames,char *menus[]); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
30 void mb_animated_menu_set_speed(mb_animated_menu_t *m,int speed); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
31 int mb_animated_menu_get_speed(mb_animated_menu_t *m); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
32 void mb_animated_menu_set_callback(mb_animated_menu_t *m, void (*f)(mb_animated_menu_t *m, int sel)); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
33 #endif |