Mercurial > MadButterfly
comparison examples/menu/main.c @ 299:5bf503270419
Fix the Fade out issue in scroll up.
author | wycc |
---|---|
date | Wed, 04 Feb 2009 09:12:02 +0800 |
parents | 959c4ac544a1 |
children | 8b45e7b374b8 |
comparison
equal
deleted
inserted
replaced
298:959c4ac544a1 | 299:5bf503270419 |
---|---|
122 } | 122 } |
123 // fade out the item[7] | 123 // fade out the item[7] |
124 snprintf(name, sizeof(name),"item%d", items[7]); | 124 snprintf(name, sizeof(name),"item%d", items[7]); |
125 textgroup = (coord_t *) MB_SPRITE_GET_OBJ(sprite,name); | 125 textgroup = (coord_t *) MB_SPRITE_GET_OBJ(sprite,name); |
126 mb_shift_new(0,100, textgroup,word); | 126 mb_shift_new(0,100, textgroup,word); |
127 mb_visibility_new(VIS_HIDDEN, textgroup,word); | |
128 | 127 |
129 // fade in the item[8] | 128 // fade in the item[8] |
130 snprintf(name, sizeof(name),"item%d", items[8]); | 129 snprintf(name, sizeof(name),"item%d", items[8]); |
131 textgroup = (coord_t *) MB_SPRITE_GET_OBJ(sprite,name); | 130 textgroup = (coord_t *) MB_SPRITE_GET_OBJ(sprite,name); |
132 snprintf(name,sizeof(name),"item%d", items[0]); | 131 snprintf(name,sizeof(name),"item%d", items[0]); |
139 mb_shift_new(0,menus_y[data->cur]-coord_y(lightbar),lightbar,word); | 138 mb_shift_new(0,menus_y[data->cur]-coord_y(lightbar),lightbar,word); |
140 | 139 |
141 MB_TIMEVAL_SET(&start, 0, SPEED); | 140 MB_TIMEVAL_SET(&start, 0, SPEED); |
142 MB_TIMEVAL_SET(&playing, 0, 0); | 141 MB_TIMEVAL_SET(&playing, 0, 0); |
143 word = mb_progm_next_word(progm, &start, &playing); | 142 word = mb_progm_next_word(progm, &start, &playing); |
144 snprintf(name, sizeof(name),"item%d", items[8]); | 143 snprintf(name, sizeof(name),"item%d", items[7]); |
145 textgroup = (coord_t *) MB_SPRITE_GET_OBJ(sprite,name); | 144 textgroup = (coord_t *) MB_SPRITE_GET_OBJ(sprite,name); |
146 mb_visibility_new(VIS_VISIBLE, textgroup,word); | 145 mb_visibility_new(VIS_HIDDEN, textgroup,word); |
147 | 146 |
148 mb_progm_free_completed(progm); | 147 mb_progm_free_completed(progm); |
149 mb_progm_start(progm, X_MB_tman(MBAPP_RDMAN(myApp)->rt), &now); | 148 mb_progm_start(progm, X_MB_tman(MBAPP_RDMAN(myApp)->rt), &now); |
150 rdman_redraw_changed(MBAPP_RDMAN(myApp)); | 149 rdman_redraw_changed(MBAPP_RDMAN(myApp)); |
151 tmp = items[8]; | 150 tmp = items[8]; |