Skip to content

Commit

Permalink
fix: TouchGestureManager big touch event
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurnishimoto committed Apr 6, 2019
1 parent ec3bd09 commit 6f75156
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/omicron/omicron/TouchGestureManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,25 @@ void TouchGroup::addTouch( Event::Type eventType, float x, float y, int touchID,

if (getTouchCount() == 1)
{
gestureManager->generatePQServiceEvent(Event::Move, this, GESTURE_SINGLE_TOUCH);
// Big touch
float bigTouchMinSize = 0.05f;
if (mainTouch.xWidth > bigTouchMinSize)
{
if (!bigTouchGestureTriggered)
{
ofmsg("TouchGroup ID: %1% BIG touch", %ID);
gestureManager->generatePQServiceEvent(Event::Down, this, GESTURE_BIG_TOUCH);
bigTouchGestureTriggered = true;
}
else
{
gestureManager->generatePQServiceEvent(Event::Move, this, GESTURE_BIG_TOUCH);
}
}
else
{
gestureManager->generatePQServiceEvent(Event::Move, this, GESTURE_SINGLE_TOUCH);
}
}
else
{
Expand Down

0 comments on commit 6f75156

Please sign in to comment.