Mercurial > MadButterfly
comparison examples/dynamic/main.c @ 278:a90fd749af82 mbtext
Implement the whole tspan attribute. Currently, we can accept font family/font style/font weight and font size.
author | wycc |
---|---|
date | Sat, 31 Jan 2009 09:41:04 +0800 |
parents | ab8284c8dcee |
children | 433fa83d16f9 |
comparison
equal
deleted
inserted
replaced
277:5006e4abdda5 | 278:a90fd749af82 |
---|---|
124 sprite = sprite_load("button", myApp->rdman, myApp->rdman->root_coord); | 124 sprite = sprite_load("button", myApp->rdman, myApp->rdman->root_coord); |
125 b = mb_button_new(myApp->rdman, sprite, "btn"); | 125 b = mb_button_new(myApp->rdman, sprite, "btn"); |
126 mb_button_add_onClick(b, test,NULL); | 126 mb_button_add_onClick(b, test,NULL); |
127 } | 127 } |
128 | 128 |
129 void draw_text() | |
130 { | |
131 | |
132 } | |
133 | |
129 int main(int argc, char * const argv[]) { | 134 int main(int argc, char * const argv[]) { |
130 subject_t *subject; | 135 subject_t *subject; |
131 mb_obj_t *button; | 136 mb_obj_t *button; |
132 MyAppData data; | 137 MyAppData data; |
133 mb_timeval_t tmo,interval; | 138 mb_timeval_t tmo,interval; |
135 if (argc > 1) | 140 if (argc > 1) |
136 myApp = MBApp_Init(argv[1]); | 141 myApp = MBApp_Init(argv[1]); |
137 else | 142 else |
138 myApp = MBApp_Init("scene"); | 143 myApp = MBApp_Init("scene"); |
139 data.currentscene=0; | 144 data.currentscene=0; |
145 draw_text(); | |
140 MBApp_setData(myApp,&data); | 146 MBApp_setData(myApp,&data); |
141 MyApp_InitContent(); | 147 MyApp_InitContent(); |
142 get_now(&tmo); | 148 get_now(&tmo); |
143 MB_TIMEVAL_SET(&interval, 1 ,0); | 149 MB_TIMEVAL_SET(&interval, 1 ,0); |
144 mb_tman_timeout( MBApp_getTimer(myApp), &tmo, switch_scene, myApp); | 150 mb_tman_timeout( MBApp_getTimer(myApp), &tmo, switch_scene, myApp); |