1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-27 00:41:08 +02:00

Merge pull request #2168 from IvanSavenko/gui_handler_event_handling_refactoring

Event handling refactoring
This commit is contained in:
Ivan Savenko
2023-05-23 15:08:10 +03:00
committed by GitHub
59 changed files with 1647 additions and 1150 deletions

View File

@ -18,6 +18,7 @@
#include "../adventureMap/AdventureMapInterface.h"
#include "../gui/CGuiHandler.h"
#include "../gui/CursorHandler.h"
#include "../gui/MouseButton.h"
#include "../../lib/CConfigHandler.h"
@ -105,8 +106,8 @@ void MapViewActions::handleSwipeMove(const Point & cursorPosition)
if(!swipeEnabled() && !GH.isMouseButtonPressed(MouseButton::MIDDLE))
return;
// on mobile platforms with enabled swipe any button is enough
if(swipeEnabled() && (!GH.isMouseButtonPressed() || GH.multifinger))
// on mobile platforms with enabled swipe we use left button
if(swipeEnabled() && !GH.isMouseButtonPressed(MouseButton::LEFT))
return;
if(!isSwiping)