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

added setting

This commit is contained in:
Michael
2023-08-27 00:33:52 +02:00
committed by GitHub
parent 4eecca2d9a
commit bbd69fd430
2 changed files with 9 additions and 3 deletions

View File

@ -85,7 +85,8 @@ void BasicMapView::showAll(Canvas & to)
void MapView::tick(uint32_t msPassed)
{
postSwipe(msPassed);
if(settings["adventure"]["smoothDragging"].Bool())
postSwipe(msPassed);
BasicMapView::tick(msPassed);
}
@ -123,7 +124,8 @@ void MapView::onMapScrolled(const Point & distance)
void MapView::onMapSwiped(const Point & viewPosition)
{
swipeHistory.push_back(std::pair<uint32_t, Point>(GH.input().getTicks(), viewPosition));
if(settings["adventure"]["smoothDragging"].Bool())
swipeHistory.push_back(std::pair<uint32_t, Point>(GH.input().getTicks(), viewPosition));
controller->setViewCenter(model->getMapViewCenter() + viewPosition, model->getLevel());
}