Quellcode durchsuchen

E3 DWIN: "No Media" message

Scott Lahteine vor 3 Jahren
Ursprung
Commit
3245a5fdf6
2 geänderte Dateien mit 12 neuen und 4 gelöschten Zeilen
  1. 10
    4
      Marlin/src/lcd/dwin/e3v2/dwin.cpp
  2. 2
    0
      Marlin/src/lcd/dwin/e3v2/dwin.h

+ 10
- 4
Marlin/src/lcd/dwin/e3v2/dwin.cpp Datei anzeigen

1753
 
1753
 
1754
   Draw_Back_First();
1754
   Draw_Back_First();
1755
 
1755
 
1756
-  // As many files as will fit
1757
-  LOOP_L_N(i, _MIN(nr_sd_menu_items(), MROWS))
1758
-    Draw_SDItem(i, i + 1);
1756
+  if (card.isMounted()) {
1757
+    // As many files as will fit
1758
+    LOOP_L_N(i, _MIN(nr_sd_menu_items(), MROWS))
1759
+      Draw_SDItem(i, i + 1);
1759
 
1760
 
1760
-  TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift());
1761
+    TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift());
1762
+  }
1763
+  else {
1764
+    DWIN_Draw_Rectangle(1, Color_Bg_Red, 10, MBASE(3) - 10, DWIN_WIDTH - 10, MBASE(4));
1765
+    DWIN_Draw_String(false, false, font16x32, Color_Yellow, Color_Bg_Red, ((DWIN_WIDTH) - 8 * 16) / 2, MBASE(3), F("No Media"));
1766
+  }
1761
 }
1767
 }
1762
 
1768
 
1763
 bool DWIN_lcd_sd_status = false;
1769
 bool DWIN_lcd_sd_status = false;

+ 2
- 0
Marlin/src/lcd/dwin/e3v2/dwin.h Datei anzeigen

215
 
215
 
216
 // Color
216
 // Color
217
 #define Color_White       0xFFFF
217
 #define Color_White       0xFFFF
218
+#define Color_Yellow      0xFF0F
218
 #define Color_Bg_Window   0x31E8  // Popup background color
219
 #define Color_Bg_Window   0x31E8  // Popup background color
219
 #define Color_Bg_Blue     0x1125  // Dark blue background color
220
 #define Color_Bg_Blue     0x1125  // Dark blue background color
220
 #define Color_Bg_Black    0x0841  // Black background color
221
 #define Color_Bg_Black    0x0841  // Black background color
222
+#define Color_Bg_Red      0xF00F  // Red background color
221
 #define Popup_Text_Color  0xD6BA  // Popup font background color
223
 #define Popup_Text_Color  0xD6BA  // Popup font background color
222
 #define Line_Color        0x3A6A  // Split line color
224
 #define Line_Color        0x3A6A  // Split line color
223
 #define Rectangle_Color   0xEE2F  // Blue square cursor color
225
 #define Rectangle_Color   0xEE2F  // Blue square cursor color

Laden…
Abbrechen
Speichern