1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Added panning gesture, activated by mouse wheel press

This commit is contained in:
Ivan Savenko
2023-05-26 21:46:09 +03:00
parent 1a5c69a424
commit 48859e186e
14 changed files with 55 additions and 137 deletions

View File

@@ -117,7 +117,7 @@ void MapView::onMapScrolled(const Point & distance)
void MapView::onMapSwiped(const Point & viewPosition)
{
isSwiping = true;
controller->setViewCenter(viewPosition, model->getLevel());
controller->setViewCenter(model->getMapViewCenter() + viewPosition, model->getLevel());
}
void MapView::onMapSwipeEnded()