1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Implemented tolerance for touch events

This commit is contained in:
Ivan Savenko
2023-09-06 01:06:01 +03:00
parent 9d4d2e0bae
commit 3973624278
11 changed files with 93 additions and 24 deletions

View File

@@ -50,10 +50,10 @@ void InputSourceMouse::handleEventMouseButtonDown(const SDL_MouseButtonEvent & b
if(button.clicks > 1)
GH.events().dispatchMouseDoubleClick(position);
else
GH.events().dispatchMouseLeftButtonPressed(position);
GH.events().dispatchMouseLeftButtonPressed(position, 0);
break;
case SDL_BUTTON_RIGHT:
GH.events().dispatchShowPopup(position);
GH.events().dispatchShowPopup(position, 0);
break;
case SDL_BUTTON_MIDDLE:
middleClickPosition = position;
@@ -74,7 +74,7 @@ void InputSourceMouse::handleEventMouseButtonUp(const SDL_MouseButtonEvent & but
switch(button.button)
{
case SDL_BUTTON_LEFT:
GH.events().dispatchMouseLeftButtonReleased(position);
GH.events().dispatchMouseLeftButtonReleased(position, 0);
break;
case SDL_BUTTON_RIGHT:
GH.events().dispatchClosePopup(position);