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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user