Skip to content

Commit

Permalink
xpt: allow smooth menu scroll up
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot committed Jul 27, 2020
1 parent 743ed09 commit b706206
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Marlin/src/feature/touch/xpt2046.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ uint8_t XPT2046::read_buttons() {
: WITHIN(x, 242, 305) ? EN_C
: 0;

// Scroll up when sliding finger up to first menu item
if (y < LCD_PIXEL_OFFSET_Y) return TERN(REVERSE_MENU_DIRECTION, EN_B, EN_A);

if (x > TOUCH_SCREEN_WIDTH || !WITHIN(y, SCREEN_START_TOP, SCREEN_START_TOP + SCREEN_HEIGHT)) return 0;

// Column and row above BUTTON_AREA_TOP
Expand Down

0 comments on commit b706206

Please sign in to comment.