mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
added setting
This commit is contained in:
parent
4eecca2d9a
commit
bbd69fd430
@ -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());
|
||||
}
|
||||
|
@ -221,7 +221,7 @@
|
||||
"type" : "object",
|
||||
"additionalProperties" : false,
|
||||
"default" : {},
|
||||
"required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "forceQuickCombat", "borderScroll", "leftButtonDrag" ],
|
||||
"required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "forceQuickCombat", "borderScroll", "leftButtonDrag", "smoothDragging" ],
|
||||
"properties" : {
|
||||
"heroMoveTime" : {
|
||||
"type" : "number",
|
||||
@ -265,6 +265,10 @@
|
||||
"leftButtonDrag" : {
|
||||
"type" : "boolean",
|
||||
"default" : false
|
||||
},
|
||||
"smoothDragging" : {
|
||||
"type" : "boolean",
|
||||
"default" : true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user