1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

wheelScrolled event now accepts distance instead of bool

This commit is contained in:
Ivan Savenko
2023-05-27 17:27:49 +03:00
parent e2a85e25fa
commit dc8e9cd048
8 changed files with 37 additions and 25 deletions

View File

@ -64,11 +64,11 @@ void MapViewActions::mouseMoved(const Point & cursorPosition)
handleHover(cursorPosition);
}
void MapViewActions::wheelScrolled(bool down, bool in)
void MapViewActions::wheelScrolled(int distance, bool inside)
{
if (!in)
if (!inside)
return;
adventureInt->hotkeyZoom(down ? -1 : +1);
adventureInt->hotkeyZoom(distance);
}
void MapViewActions::gesturePanning(const Point & distance)