|
@@ -473,21 +473,29 @@ static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
|
473
|
473
|
u8g.setPrintPos((START_ROW) * (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT));
|
474
|
474
|
}
|
475
|
475
|
|
476
|
|
-static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, bool center=true) {
|
477
|
|
- char c;
|
478
|
|
- uint8_t n = LCD_WIDTH;
|
479
|
|
- u8g.setPrintPos(0, (row + 1) * (DOG_CHAR_HEIGHT));
|
480
|
|
- u8g.setColorIndex(1); // normal text
|
481
|
|
- if (center) {
|
482
|
|
- int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
|
483
|
|
- while (--pad >= 0) { lcd_print(' '); n--; }
|
484
|
|
- }
|
485
|
|
- while (c = pgm_read_byte(pstr)) {
|
486
|
|
- n -= lcd_print(c);
|
487
|
|
- pstr++;
|
|
476
|
+#if ENABLED(LCD_INFO_MENU)
|
|
477
|
+
|
|
478
|
+ static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, const char* valstr=NULL, bool center=false) {
|
|
479
|
+ char c;
|
|
480
|
+ int8_t n = LCD_WIDTH;
|
|
481
|
+ u8g.setPrintPos(0, (row + 1) * (DOG_CHAR_HEIGHT));
|
|
482
|
+ u8g.setColorIndex(1); // normal text
|
|
483
|
+ if (center) {
|
|
484
|
+ int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
|
|
485
|
+ while (--pad >= 0) { lcd_print(' '); n--; }
|
|
486
|
+ }
|
|
487
|
+ while (c = pgm_read_byte(pstr)) {
|
|
488
|
+ n -= lcd_print(c);
|
|
489
|
+ pstr++;
|
|
490
|
+ }
|
|
491
|
+ if (valstr) {
|
|
492
|
+ lcd_print(valstr);
|
|
493
|
+ n -= lcd_strlen(valstr);
|
|
494
|
+ }
|
|
495
|
+ while (n-- > 0) lcd_print(' ');
|
488
|
496
|
}
|
489
|
|
- while (n--) lcd_print(' ');
|
490
|
|
-}
|
|
497
|
+
|
|
498
|
+#endif // LCD_INFO_MENU
|
491
|
499
|
|
492
|
500
|
static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) {
|
493
|
501
|
UNUSED(pstr);
|