# HG changeset patch # User wycc # Date 1235224265 -28800 # Node ID b6891068109f7561bb71c21a74d038964299c82d # Parent c981e561ac37e08af49e1737acb8fcda54257937 Fix the boundary condition for scroll down diff -r c981e561ac37 -r b6891068109f examples/menu/main.c --- a/examples/menu/main.c Sat Feb 21 21:45:04 2009 +0800 +++ b/examples/menu/main.c Sat Feb 21 21:51:05 2009 +0800 @@ -244,15 +244,6 @@ get_now(&now); lightbar = (coord_t *) m->lightbar; -#if 1 - // The redraw algorithm has bugs so that the items is not redrawed correctly. We redraw the items under the lightbar to work around it. - // Comment these lines if the algprothm is fixed. - rdman_coord_changed(MBAPP_RDMAN(m->app),m->objects[m->cur]); - if (m->cur != 0) - mb_shift_new(0,0,m->objects[m->cur-1],word); - if (m->cur != 7) - mb_shift_new(0,0,m->objects[m->cur+1],word); -#endif mb_shift_new(0,m->menus_y[m->cur]-coord_y(lightbar),lightbar,word); mb_progm_free_completed(progm); m->ready--; @@ -287,11 +278,11 @@ mb_animated_menu_moveLightBar(m); } } else { - if ((m->top+8) < m->max) { + if ((m->top+8) < m->max-1) { m->top++; mb_animated_menu_fillMenuContentDown(m); } else { - if (m->cur+m->top < m->max-1) { + if (m->cur+m->top < m->max-2) { m->cur++; mb_animated_menu_moveLightBar(m); } else