E3 DWIN: "No Media" message

This commit is contained in:
Scott Lahteine 2020-09-27 16:48:03 -05:00
parent 37cf156223
commit 3245a5fdf6
2 changed files with 12 additions and 4 deletions

View file

@ -1753,11 +1753,17 @@ inline void Redraw_SD_List() {
Draw_Back_First();
// As many files as will fit
LOOP_L_N(i, _MIN(nr_sd_menu_items(), MROWS))
Draw_SDItem(i, i + 1);
if (card.isMounted()) {
// As many files as will fit
LOOP_L_N(i, _MIN(nr_sd_menu_items(), MROWS))
Draw_SDItem(i, i + 1);
TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift());
TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift());
}
else {
DWIN_Draw_Rectangle(1, Color_Bg_Red, 10, MBASE(3) - 10, DWIN_WIDTH - 10, MBASE(4));
DWIN_Draw_String(false, false, font16x32, Color_Yellow, Color_Bg_Red, ((DWIN_WIDTH) - 8 * 16) / 2, MBASE(3), F("No Media"));
}
}
bool DWIN_lcd_sd_status = false;

View file

@ -215,9 +215,11 @@ enum processID : uint8_t {
// Color
#define Color_White 0xFFFF
#define Color_Yellow 0xFF0F
#define Color_Bg_Window 0x31E8 // Popup background color
#define Color_Bg_Blue 0x1125 // Dark blue background color
#define Color_Bg_Black 0x0841 // Black background color
#define Color_Bg_Red 0xF00F // Red background color
#define Popup_Text_Color 0xD6BA // Popup font background color
#define Line_Color 0x3A6A // Split line color
#define Rectangle_Color 0xEE2F // Blue square cursor color