Added touch input support for entering theme-menu via swipe-left.
This commit is contained in:
parent
2695d48ba7
commit
982120a9fd
@ -3,6 +3,8 @@
|
|||||||
#define TAP_MOVEMENT_GAP 20
|
#define TAP_MOVEMENT_GAP 20
|
||||||
#define VERTICAL_SWIPE_HORIZONTAL_PLAY 250
|
#define VERTICAL_SWIPE_HORIZONTAL_PLAY 250
|
||||||
#define VERTICAL_SWIPE_MINIMUM_DISTANCE 300
|
#define VERTICAL_SWIPE_MINIMUM_DISTANCE 300
|
||||||
|
#define HORIZONTAL_SWIPE_VERTICAL_PLAY 250
|
||||||
|
#define HORIZONTAL_SWIPE_MINIMUM_DISTANCE 300
|
||||||
#define LISTING_START_Y 475
|
#define LISTING_START_Y 475
|
||||||
#define LISTING_END_Y 647
|
#define LISTING_END_Y 647
|
||||||
#define BUTTON_START_Y 672
|
#define BUTTON_START_Y 672
|
||||||
@ -137,6 +139,13 @@ void handleTouch(menu_s* menu) {
|
|||||||
launchMenuNetloaderTask();
|
launchMenuNetloaderTask();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Horizontal Swipe
|
||||||
|
else if (abs(y1 - y2) < HORIZONTAL_SWIPE_VERTICAL_PLAY && distance(x1, y1, x2, y2) > HORIZONTAL_SWIPE_MINIMUM_DISTANCE) {
|
||||||
|
// Swipe left to go into theme-menu
|
||||||
|
if (x1 - x2 > 0) {
|
||||||
|
themeMenuStartup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
touchInfo.gestureInProgress = false;
|
touchInfo.gestureInProgress = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user