summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/rockboy/menu.c')
-rw-r--r--apps/plugins/rockboy/menu.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c
index 2334f0d17e..50f86c3408 100644
--- a/apps/plugins/rockboy/menu.c
+++ b/apps/plugins/rockboy/menu.c
@@ -356,12 +356,13 @@ static void select_item(char *title, int curr_item, size_t item_i) {
356 x = MENU_X + MENU_ITEM_PAD; 356 x = MENU_X + MENU_ITEM_PAD;
357 w = MENU_WIDTH - 2 * MENU_ITEM_PAD; 357 w = MENU_WIDTH - 2 * MENU_ITEM_PAD;
358 358
359 rb->lcd_set_drawmode(DRMODE_COMPLEMENT);
359 /* if there is a current item, then deselect it */ 360 /* if there is a current item, then deselect it */
360 if (curr_item >= 0) { 361 if (curr_item >= 0) {
361 /* deselect old item */ 362 /* deselect old item */
362 y = MENU_Y + h + MENU_ITEM_PAD * 2; /* account for title */ 363 y = MENU_Y + h + MENU_ITEM_PAD * 2; /* account for title */
363 y += h * curr_item; 364 y += h * curr_item;
364 rb->lcd_invertrect(x, y, w, h); 365 rb->lcd_fillrect(x, y, w, h);
365 } 366 }
366 367
367 /* select new item */ 368 /* select new item */
@@ -370,7 +371,8 @@ static void select_item(char *title, int curr_item, size_t item_i) {
370 /* select new item */ 371 /* select new item */
371 y = MENU_Y + h + MENU_ITEM_PAD * 2; /* account for title */ 372 y = MENU_Y + h + MENU_ITEM_PAD * 2; /* account for title */
372 y += h * curr_item; 373 y += h * curr_item;
373 rb->lcd_invertrect(x, y, w, h); 374 rb->lcd_fillrect(x, y, w, h);
375 rb->lcd_set_drawmode(DRMODE_SOLID);
374 376
375 /* update the menu window */ 377 /* update the menu window */
376 rb->lcd_update_rect(MENU_RECT); 378 rb->lcd_update_rect(MENU_RECT);
@@ -392,7 +394,9 @@ static void draw_menu(char *title, char **items, size_t num_items) {
392 394
393 /* draw the outline */ 395 /* draw the outline */
394 rb->lcd_fillrect(SHADOW_RECT); 396 rb->lcd_fillrect(SHADOW_RECT);
395 rb->lcd_clearrect(MENU_RECT); 397 rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
398 rb->lcd_fillrect(MENU_RECT);
399 rb->lcd_set_drawmode(DRMODE_SOLID);
396 rb->lcd_drawrect(MENU_RECT); 400 rb->lcd_drawrect(MENU_RECT);
397 401
398 /* calculate x/y */ 402 /* calculate x/y */
@@ -406,8 +410,10 @@ static void draw_menu(char *title, char **items, size_t num_items) {
406 rb->lcd_drawline(MENU_X, i, MENU_X + MENU_WIDTH, i); 410 rb->lcd_drawline(MENU_X, i, MENU_X + MENU_WIDTH, i);
407 411
408 /* clear title rect */ 412 /* clear title rect */
409 rb->lcd_clearrect((LCD_WIDTH - w) / 2 - 2, y - 2, w + 4, h); 413 rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
410 414 rb->lcd_fillrect((LCD_WIDTH - w) / 2 - 2, y - 2, w + 4, h);
415 rb->lcd_set_drawmode(DRMODE_SOLID);
416
411 /* draw centered title on screen */ 417 /* draw centered title on screen */
412 rb->lcd_putsxy((LCD_WIDTH - w)/2, y, title); 418 rb->lcd_putsxy((LCD_WIDTH - w)/2, y, title);
413 419