Browse Source

Get back folder symbols on Hitachi displays

and make use of column 20.
AnHardt 10 years ago
parent
commit
81bab8739d
1 changed files with 8 additions and 8 deletions
  1. 8
    8
      Marlin/ultralcd_implementation_hitachi_HD44780.h

+ 8
- 8
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

624
 
624
 
625
 static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) {
625
 static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) {
626
   char c;
626
   char c;
627
-  uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2);
627
+  uint8_t n = LCD_WIDTH - 2;
628
   lcd.setCursor(0, row);
628
   lcd.setCursor(0, row);
629
   lcd.print(sel ? pre_char : ' ');
629
   lcd.print(sel ? pre_char : ' ');
630
   while ((c = pgm_read_byte(pstr)) && n > 0) {
630
   while ((c = pgm_read_byte(pstr)) && n > 0) {
633
   }
633
   }
634
   while(n--) lcd.print(' ');
634
   while(n--) lcd.print(' ');
635
   lcd.print(post_char);
635
   lcd.print(post_char);
636
-  lcd.print(' ');
637
 }
636
 }
638
 
637
 
639
 static void lcd_implementation_drawmenu_setting_edit_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char* data) {
638
 static void lcd_implementation_drawmenu_setting_edit_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char* data) {
640
   char c;
639
   char c;
641
-  uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2) - lcd_strlen(data);
640
+  uint8_t n = LCD_WIDTH - 2 - lcd_strlen(data);
642
   lcd.setCursor(0, row);
641
   lcd.setCursor(0, row);
643
   lcd.print(sel ? pre_char : ' ');
642
   lcd.print(sel ? pre_char : ' ');
644
   while ((c = pgm_read_byte(pstr)) && n > 0) {
643
   while ((c = pgm_read_byte(pstr)) && n > 0) {
651
 }
650
 }
652
 static void lcd_implementation_drawmenu_setting_edit_generic_P(bool sel, uint8_t row, const char* pstr, char pre_char, const char* data) {
651
 static void lcd_implementation_drawmenu_setting_edit_generic_P(bool sel, uint8_t row, const char* pstr, char pre_char, const char* data) {
653
   char c;
652
   char c;
654
-  uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2) - lcd_strlen_P(data);
653
+  uint8_t n = LCD_WIDTH - 2 - lcd_strlen_P(data);
655
   lcd.setCursor(0, row);
654
   lcd.setCursor(0, row);
656
   lcd.print(sel ? pre_char : ' ');
655
   lcd.print(sel ? pre_char : ' ');
657
   while ((c = pgm_read_byte(pstr)) && n > 0) {
656
   while ((c = pgm_read_byte(pstr)) && n > 0) {
688
   lcd.setCursor(1, 1);
687
   lcd.setCursor(1, 1);
689
   lcd_printPGM(pstr);
688
   lcd_printPGM(pstr);
690
   lcd.print(':');
689
   lcd.print(':');
691
-  lcd.setCursor(LCD_WIDTH - (LCD_WIDTH < 20 ? 0 : 1) - lcd_strlen(value), 1);
690
+  lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
692
   lcd_print(value);
691
   lcd_print(value);
693
 }
692
 }
694
 
693
 
695
-static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename, uint8_t concat) {
694
+static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename, uint8_t concat, char post_char) {
696
   char c;
695
   char c;
697
   uint8_t n = LCD_WIDTH - concat;
696
   uint8_t n = LCD_WIDTH - concat;
698
   lcd.setCursor(0, row);
697
   lcd.setCursor(0, row);
706
     filename++;
705
     filename++;
707
   }
706
   }
708
   while (n--) lcd.print(' ');
707
   while (n--) lcd.print(' ');
708
+  lcd.print(post_char);
709
 }
709
 }
710
 
710
 
711
 static void lcd_implementation_drawmenu_sdfile(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) {
711
 static void lcd_implementation_drawmenu_sdfile(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) {
712
-  lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 1);
712
+  lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2, ' ');
713
 }
713
 }
714
 
714
 
715
 static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) {
715
 static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) {
716
-  lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2);
716
+  lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2, LCD_STR_FOLDER[0]);
717
 }
717
 }
718
 
718
 
719
 #define lcd_implementation_drawmenu_back(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])
719
 #define lcd_implementation_drawmenu_back(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])

Loading…
Cancel
Save