diff options
| author | raysan5 <raysan5@gmail.com> | 2016-04-17 11:36:40 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-04-17 11:36:40 +0200 |
| commit | 17eefed08fa052b39c9ee4c4cb486794a8551c92 (patch) | |
| tree | 7bf325d93633663ff72a11ba8f919a184581fccb /examples/core_gestures_detection.c | |
| parent | 2e5d898443767e027f0e1deab7ed3060085b62fd (diff) | |
| download | raylib-17eefed08fa052b39c9ee4c4cb486794a8551c92.tar.gz raylib-17eefed08fa052b39c9ee4c4cb486794a8551c92.zip | |
Improved gestures system
Diffstat (limited to 'examples/core_gestures_detection.c')
| -rw-r--r-- | examples/core_gestures_detection.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/core_gestures_detection.c b/examples/core_gestures_detection.c index a5cf8e69..63a1e6bd 100644 --- a/examples/core_gestures_detection.c +++ b/examples/core_gestures_detection.c @@ -43,12 +43,11 @@ int main() // Update //---------------------------------------------------------------------------------- lastGesture = currentGesture; + currentGesture = GetGestureDetected(); touchPosition = GetTouchPosition(0); - - if (CheckCollisionPointRec(touchPosition, touchArea) && IsGestureDetected()) + + if (CheckCollisionPointRec(touchPosition, touchArea) && (currentGesture != GESTURE_NONE)) { - currentGesture = GetGestureType(); - if (currentGesture != lastGesture) { // Store gesture string @@ -78,7 +77,6 @@ int main() } } } - else currentGesture = GESTURE_NONE; //---------------------------------------------------------------------------------- // Draw |
