mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-28 03:57:02 +02:00
added setting
This commit is contained in:
parent
4eecca2d9a
commit
bbd69fd430
@ -85,6 +85,7 @@ void BasicMapView::showAll(Canvas & to)
|
|||||||
|
|
||||||
void MapView::tick(uint32_t msPassed)
|
void MapView::tick(uint32_t msPassed)
|
||||||
{
|
{
|
||||||
|
if(settings["adventure"]["smoothDragging"].Bool())
|
||||||
postSwipe(msPassed);
|
postSwipe(msPassed);
|
||||||
|
|
||||||
BasicMapView::tick(msPassed);
|
BasicMapView::tick(msPassed);
|
||||||
@ -123,6 +124,7 @@ void MapView::onMapScrolled(const Point & distance)
|
|||||||
|
|
||||||
void MapView::onMapSwiped(const Point & viewPosition)
|
void MapView::onMapSwiped(const Point & viewPosition)
|
||||||
{
|
{
|
||||||
|
if(settings["adventure"]["smoothDragging"].Bool())
|
||||||
swipeHistory.push_back(std::pair<uint32_t, Point>(GH.input().getTicks(), viewPosition));
|
swipeHistory.push_back(std::pair<uint32_t, Point>(GH.input().getTicks(), viewPosition));
|
||||||
|
|
||||||
controller->setViewCenter(model->getMapViewCenter() + viewPosition, model->getLevel());
|
controller->setViewCenter(model->getMapViewCenter() + viewPosition, model->getLevel());
|
||||||
|
@ -221,7 +221,7 @@
|
|||||||
"type" : "object",
|
"type" : "object",
|
||||||
"additionalProperties" : false,
|
"additionalProperties" : false,
|
||||||
"default" : {},
|
"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" : {
|
"properties" : {
|
||||||
"heroMoveTime" : {
|
"heroMoveTime" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -265,6 +265,10 @@
|
|||||||
"leftButtonDrag" : {
|
"leftButtonDrag" : {
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
"default" : false
|
"default" : false
|
||||||
|
},
|
||||||
|
"smoothDragging" : {
|
||||||
|
"type" : "boolean",
|
||||||
|
"default" : true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user