summaryrefslogtreecommitdiff
path: root/apps/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/menu.c b/apps/menu.c
index bdf6f45e54..1c6be6f58a 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -64,7 +64,7 @@ struct menu {
64 the margins, so this is the amount of lines 64 the margins, so this is the amount of lines
65 we add to the cursor Y position to position 65 we add to the cursor Y position to position
66 it on a line */ 66 it on a line */
67#define CURSOR_WIDTH 4 67#define CURSOR_WIDTH (global_settings.invert_cursor ? 0 : 4)
68 68
69#define SCROLLBAR_X 0 69#define SCROLLBAR_X 0
70#define SCROLLBAR_Y lcd_getymargin() 70#define SCROLLBAR_Y lcd_getymargin()
@@ -92,6 +92,8 @@ void put_cursorxy(int x, int y, bool on)
92#ifdef HAVE_LCD_BITMAP 92#ifdef HAVE_LCD_BITMAP
93 int fh, fw; 93 int fh, fw;
94 int xpos, ypos; 94 int xpos, ypos;
95 if (global_settings.invert_cursor)
96 return;
95 lcd_getstringsize("A", &fw, &fh); 97 lcd_getstringsize("A", &fw, &fh);
96 xpos = x*6; 98 xpos = x*6;
97 ypos = y*fh + lcd_getymargin(); 99 ypos = y*fh + lcd_getymargin();
@@ -146,7 +148,13 @@ static void menu_draw(int m)
146 (i < menus[m].itemcount) && (i<menus[m].top+menu_lines); 148 (i < menus[m].itemcount) && (i<menus[m].top+menu_lines);
147 i++) { 149 i++) {
148 if((menus[m].cursor - menus[m].top)==(i-menus[m].top)) 150 if((menus[m].cursor - menus[m].top)==(i-menus[m].top))
149 lcd_puts_scroll(LINE_X, i-menus[m].top, menus[m].items[i].desc); 151#ifdef HAVE_LCD_BITMAP
152 if (global_settings.invert_cursor)
153 lcd_puts_scroll_style(LINE_X, i-menus[m].top,
154 menus[m].items[i].desc, STYLE_INVERT);
155 else
156#endif
157 lcd_puts_scroll(LINE_X, i-menus[m].top, menus[m].items[i].desc);
150 else 158 else
151 lcd_puts(LINE_X, i-menus[m].top, menus[m].items[i].desc); 159 lcd_puts(LINE_X, i-menus[m].top, menus[m].items[i].desc);
152 } 160 }
@@ -197,8 +205,8 @@ static void put_cursor(int m, int target)
197 do_update = false; 205 do_update = false;
198 } 206 }
199 207
200 if (do_update) { 208 if (do_update && !global_settings.invert_cursor) {
201 put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, true); 209 put_cursorxy(CURSOR_X, menus[m].cursor - menus[m].top, true);
202 lcd_update(); 210 lcd_update();
203 } 211 }
204 212