Browse Source

SINGLE_TOUCH_NAVIGATION Follow Up (#20213)

Victor Oliveira 4 years ago
parent
commit
28e315cd69
No account linked to committer's email address

+ 2
- 1
Marlin/src/lcd/tft/touch.cpp View File

@@ -156,10 +156,11 @@ void Touch::touch(touch_control_t *control) {
156 156
 
157 157
     case MENU_SCREEN: ui.goto_screen((screenFunc_t)control->data); break;
158 158
     case BACK: ui.goto_previous_screen(); break;
159
-    case CLICK:
159
+    case MENU_CLICK:
160 160
       TERN_(SINGLE_TOUCH_NAVIGATION, ui.encoderPosition = control->data);
161 161
       ui.lcd_clicked = true;
162 162
       break;
163
+    case CLICK: ui.lcd_clicked = true; break;
163 164
     #if HAS_RESUME_CONTINUE
164 165
       case RESUME_CONTINUE: extern bool wait_for_user; wait_for_user = false; break;
165 166
     #endif

+ 1
- 0
Marlin/src/lcd/tft/touch.h View File

@@ -45,6 +45,7 @@ enum TouchControlType : uint16_t {
45 45
   PAGE_UP,
46 46
   PAGE_DOWN,
47 47
   CLICK,
48
+  MENU_CLICK,
48 49
   RESUME_CONTINUE,
49 50
   SLIDER,
50 51
   INCREASE,

+ 1
- 1
Marlin/src/lcd/tft/ui_320x240.cpp View File

@@ -652,7 +652,7 @@ void menu_item(const uint8_t row, bool sel ) {
652 652
 
653 653
   menu_line(row, sel ? COLOR_SELECTION_BG : COLOR_BACKGROUND);
654 654
   #if ENABLED(TOUCH_SCREEN)
655
-    const TouchControlType tct = TERN(SINGLE_TOUCH_NAVIGATION, true, sel) ? CLICK : MENU_ITEM;
655
+    const TouchControlType tct = TERN(SINGLE_TOUCH_NAVIGATION, true, sel) ? MENU_CLICK : MENU_ITEM;
656 656
     touch.add_control(tct, 0, 2 + 34 * row, TFT_WIDTH, 32, encoderTopLine + row);
657 657
   #endif
658 658
 }

+ 1
- 1
Marlin/src/lcd/tft/ui_480x320.cpp View File

@@ -659,7 +659,7 @@ void menu_item(const uint8_t row, bool sel ) {
659 659
 
660 660
   menu_line(row, sel ? COLOR_SELECTION_BG : COLOR_BACKGROUND);
661 661
   #if ENABLED(TOUCH_SCREEN)
662
-    const TouchControlType tct = TERN(SINGLE_TOUCH_NAVIGATION, true, sel) ? CLICK : MENU_ITEM;
662
+    const TouchControlType tct = TERN(SINGLE_TOUCH_NAVIGATION, true, sel) ? MENU_CLICK : MENU_ITEM;
663 663
     touch.add_control(tct, 0, 4 + 45 * row, TFT_WIDTH, 43, encoderTopLine + row);
664 664
   #endif
665 665
 }

Loading…
Cancel
Save