Browse Source

Fix E3V2 Control Menu icon/text order (#21838)

Fixes #21837
vanilla_fb_2.0.x
Adrian DC 4 years ago
committed by Scott Lahteine
parent
commit
83309c1ac8
  1. 38
      Marlin/src/lcd/dwin/e3v2/dwin.cpp

38
Marlin/src/lcd/dwin/e3v2/dwin.cpp

@ -815,8 +815,6 @@ void Draw_Control_Menu() {
if (CVISI(CONTROL_CASE_ADVSET)) { if (CVISI(CONTROL_CASE_ADVSET)) {
DWIN_Draw_Label(CLINE(CONTROL_CASE_ADVSET), GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // Advanced Settings DWIN_Draw_Label(CLINE(CONTROL_CASE_ADVSET), GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // Advanced Settings
Draw_More_Icon(CSCROL(CONTROL_CASE_ADVSET));
Draw_Menu_Line(CSCROL(CONTROL_CASE_ADVSET), ICON_AdvSet);
} }
if (CVISI(CONTROL_CASE_INFO)) Item_Control_Info(CLINE(CONTROL_CASE_INFO)); if (CVISI(CONTROL_CASE_INFO)) Item_Control_Info(CLINE(CONTROL_CASE_INFO));
@ -825,23 +823,26 @@ void Draw_Control_Menu() {
Draw_Menu_Cursor(CSCROL(select_control.now)); Draw_Menu_Cursor(CSCROL(select_control.now));
// Draw icons and lines // Draw icons and lines
uint8_t i = 0; #define _TEMP_ICON(N, I, M) do { \
#define _TEMP_ICON(N) do{ ++i; if (CVISI(i)) Draw_Menu_Line(CSCROL(i), ICON_Temperature + (N) - 1); }while(0) if (CVISI(N)) { \
Draw_Menu_Line(CSCROL(N), I); \
_TEMP_ICON(CONTROL_CASE_TEMP); if (M) { \
if (CVISI(i)) Draw_More_Icon(CSCROL(i)); Draw_More_Icon(CSCROL(N)); \
} \
_TEMP_ICON(CONTROL_CASE_MOVE); } \
Draw_More_Icon(CSCROL(i)); } while(0)
_TEMP_ICON(CONTROL_CASE_TEMP, ICON_Temperature, true);
_TEMP_ICON(CONTROL_CASE_MOVE, ICON_Motion, true);
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
_TEMP_ICON(CONTROL_CASE_SAVE); _TEMP_ICON(CONTROL_CASE_SAVE, ICON_WriteEEPROM, false);
_TEMP_ICON(CONTROL_CASE_LOAD); _TEMP_ICON(CONTROL_CASE_LOAD, ICON_ReadEEPROM, false);
_TEMP_ICON(CONTROL_CASE_RESET); _TEMP_ICON(CONTROL_CASE_RESET, ICON_ResumeEEPROM, false);
#endif #endif
_TEMP_ICON(CONTROL_CASE_INFO); _TEMP_ICON(CONTROL_CASE_ADVSET, ICON_AdvSet, true);
if (CVISI(CONTROL_CASE_INFO)) Draw_More_Icon(CSCROL(i)); _TEMP_ICON(CONTROL_CASE_INFO, ICON_Info, true);
} }
void Draw_Tune_Menu() { void Draw_Tune_Menu() {
@ -2653,11 +2654,12 @@ void HMI_Control() {
Scroll_Menu(DWIN_SCROLL_UP); Scroll_Menu(DWIN_SCROLL_UP);
switch (index_control) { // Last menu items switch (index_control) { // Last menu items
case CONTROL_CASE_ADVSET: // Advance Settings > case CONTROL_CASE_ADVSET: // Advanced Settings >
Draw_Menu_Item(MROWS, ICON_AdvSet, GET_TEXT(MSG_ADVANCED_SETTINGS), true); Draw_Menu_Item(MROWS, ICON_AdvSet, GET_TEXT(MSG_ADVANCED_SETTINGS), true);
break; break;
case CONTROL_CASE_INFO: // Info > case CONTROL_CASE_INFO: // Info >
Draw_Menu_Item(MROWS, ICON_Info, GET_TEXT(MSG_INFO_SCREEN), true); Item_Control_Info(MBASE(MROWS));
Draw_Menu_Icon(MROWS, ICON_Info);
break; break;
default: break; default: break;
} }
@ -2721,7 +2723,7 @@ void HMI_Control() {
HMI_AudioFeedback(); HMI_AudioFeedback();
break; break;
#endif #endif
case CONTROL_CASE_ADVSET: // Advance Settings case CONTROL_CASE_ADVSET: // Advanced Settings
checkkey = AdvSet; checkkey = AdvSet;
select_advset.reset(); select_advset.reset();
Draw_AdvSet_Menu(); Draw_AdvSet_Menu();

Loading…
Cancel
Save