mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Fix activation of radial menu on touchscreen
This commit is contained in:
@@ -81,7 +81,10 @@ void InputSourceTouch::handleEventFingerMotion(const SDL_TouchFingerEvent & tfin
|
|||||||
{
|
{
|
||||||
Point distance = convertTouchToMouse(tfinger) - lastTapPosition;
|
Point distance = convertTouchToMouse(tfinger) - lastTapPosition;
|
||||||
if ( std::abs(distance.x) > params.panningSensitivityThreshold || std::abs(distance.y) > params.panningSensitivityThreshold)
|
if ( std::abs(distance.x) > params.panningSensitivityThreshold || std::abs(distance.y) > params.panningSensitivityThreshold)
|
||||||
|
{
|
||||||
state = TouchState::TAP_DOWN_PANNING;
|
state = TouchState::TAP_DOWN_PANNING;
|
||||||
|
GH.events().dispatchGesturePanningStarted(lastTapPosition);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TouchState::TAP_DOWN_PANNING:
|
case TouchState::TAP_DOWN_PANNING:
|
||||||
@@ -128,7 +131,6 @@ void InputSourceTouch::handleEventFingerDown(const SDL_TouchFingerEvent & tfinge
|
|||||||
{
|
{
|
||||||
lastTapPosition = convertTouchToMouse(tfinger);
|
lastTapPosition = convertTouchToMouse(tfinger);
|
||||||
GH.input().setCursorPosition(lastTapPosition);
|
GH.input().setCursorPosition(lastTapPosition);
|
||||||
GH.events().dispatchGesturePanningStarted(lastTapPosition);
|
|
||||||
state = TouchState::TAP_DOWN_SHORT;
|
state = TouchState::TAP_DOWN_SHORT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user