mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Right-click popups will stay till next tap, in line with Android UI
This commit is contained in:
@@ -79,6 +79,7 @@ void InputSourceTouch::handleEventFingerMotion(const SDL_TouchFingerEvent & tfin
|
||||
break;
|
||||
}
|
||||
case TouchState::TAP_DOWN_LONG:
|
||||
case TouchState::TAP_DOWN_LONG_AWAIT:
|
||||
{
|
||||
// no-op
|
||||
break;
|
||||
@@ -118,6 +119,7 @@ void InputSourceTouch::handleEventFingerDown(const SDL_TouchFingerEvent & tfinge
|
||||
}
|
||||
case TouchState::TAP_DOWN_DOUBLE:
|
||||
case TouchState::TAP_DOWN_LONG:
|
||||
case TouchState::TAP_DOWN_LONG_AWAIT:
|
||||
{
|
||||
// no-op
|
||||
break;
|
||||
@@ -169,6 +171,14 @@ void InputSourceTouch::handleEventFingerUp(const SDL_TouchFingerEvent & tfinger)
|
||||
break;
|
||||
}
|
||||
case TouchState::TAP_DOWN_LONG:
|
||||
{
|
||||
if (SDL_GetNumTouchFingers(tfinger.touchId) == 0)
|
||||
{
|
||||
state = TouchState::TAP_DOWN_LONG_AWAIT;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TouchState::TAP_DOWN_LONG_AWAIT:
|
||||
{
|
||||
if (SDL_GetNumTouchFingers(tfinger.touchId) == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user