|
@@ -282,8 +282,8 @@ static void lcd_implementation_status_screen() {
|
282
|
282
|
#endif
|
283
|
283
|
}
|
284
|
284
|
|
285
|
|
-static void lcd_implementation_mark_as_selected(uint8_t row, char pr_char) {
|
286
|
|
- if (pr_char != ' ') {
|
|
285
|
+static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
|
|
286
|
+ if (isSelected) {
|
287
|
287
|
u8g.setColorIndex(1); // black on white
|
288
|
288
|
u8g.drawBox (0, row*DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT);
|
289
|
289
|
u8g.setColorIndex(0); // following text must be white on black
|
|
@@ -294,11 +294,11 @@ static void lcd_implementation_mark_as_selected(uint8_t row, char pr_char) {
|
294
|
294
|
u8g.setPrintPos(START_ROW * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
|
295
|
295
|
}
|
296
|
296
|
|
297
|
|
-static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) {
|
|
297
|
+static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) {
|
298
|
298
|
char c;
|
299
|
299
|
uint8_t n = LCD_WIDTH - 2;
|
300
|
300
|
|
301
|
|
- lcd_implementation_mark_as_selected(row, sel ? pre_char : ' ');
|
|
301
|
+ lcd_implementation_mark_as_selected(row, isSelected);
|
302
|
302
|
|
303
|
303
|
while ((c = pgm_read_byte(pstr))) {
|
304
|
304
|
u8g.print(c);
|
|
@@ -310,11 +310,11 @@ static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const cha
|
310
|
310
|
u8g.print(' ');
|
311
|
311
|
}
|
312
|
312
|
|
313
|
|
-static void _drawmenu_setting_edit_generic(bool sel, uint8_t row, const char* pstr, const char* data, bool pgm) {
|
|
313
|
+static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) {
|
314
|
314
|
char c;
|
315
|
315
|
uint8_t n = LCD_WIDTH - 2 - (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data)));
|
316
|
316
|
|
317
|
|
- lcd_implementation_mark_as_selected(row, sel ? '>' : ' ');
|
|
317
|
+ lcd_implementation_mark_as_selected(row, isSelected);
|
318
|
318
|
|
319
|
319
|
while ((c = pgm_read_byte(pstr))) {
|
320
|
320
|
u8g.print(c);
|
|
@@ -379,7 +379,7 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
|
379
|
379
|
u8g.print(value);
|
380
|
380
|
}
|
381
|
381
|
|
382
|
|
-static void _drawmenu_sd(bool sel, uint8_t row, const char* pstr, const char* filename, char * const longFilename, bool isDir) {
|
|
382
|
+static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char * const longFilename, bool isDir) {
|
383
|
383
|
char c;
|
384
|
384
|
uint8_t n = LCD_WIDTH - 1;
|
385
|
385
|
|
|
@@ -388,7 +388,7 @@ static void _drawmenu_sd(bool sel, uint8_t row, const char* pstr, const char* fi
|
388
|
388
|
longFilename[n] = '\0';
|
389
|
389
|
}
|
390
|
390
|
|
391
|
|
- lcd_implementation_mark_as_selected(row, sel ? '>' : ' ');
|
|
391
|
+ lcd_implementation_mark_as_selected(row, isSelected);
|
392
|
392
|
|
393
|
393
|
if (isDir) u8g.print(LCD_STR_FOLDER[0]);
|
394
|
394
|
while ((c = *filename)) {
|