1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

add option to gui to disable smooth dragging

This commit is contained in:
Laserlicht 2023-12-10 13:38:58 +01:00 committed by GitHub
parent b8e40978a0
commit e74c2262c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 0 deletions

View File

@ -129,6 +129,8 @@
"vcmi.adventureOptions.infoBarCreatureManagement.help" : "{Info Panel Creature Management}\n\nAllows rearranging creatures in info panel instead of cycling between default components.",
"vcmi.adventureOptions.leftButtonDrag.hover" : "Left Click Drag Map",
"vcmi.adventureOptions.leftButtonDrag.help" : "{Left Click Drag Map}\n\nWhen enabled, moving mouse with left button pressed will drag adventure map view.",
"vcmi.adventureOptions.smoothDragging.hover" : "Smooth Map Dragging",
"vcmi.adventureOptions.smoothDragging.help" : "{Smooth Map Dragging}\n\nWhen enabled, map dragging has a modern run out effect.",
"vcmi.adventureOptions.mapScrollSpeed1.hover": "",
"vcmi.adventureOptions.mapScrollSpeed5.hover": "",
"vcmi.adventureOptions.mapScrollSpeed6.hover": "",

View File

@ -129,6 +129,8 @@
"vcmi.adventureOptions.infoBarCreatureManagement.help" : "{Info-Panel Kreaturenmanagement}\n\nErmöglicht die Neuanordnung von Kreaturen im Info-Panel, anstatt zwischen den Standardkomponenten zu wechseln",
"vcmi.adventureOptions.leftButtonDrag.hover" : "Ziehen der Karte mit Links",
"vcmi.adventureOptions.leftButtonDrag.help" : "{Ziehen der Karte mit Links}\n\nWenn aktiviert, wird die Maus bei gedrückter linker Taste in die Kartenansicht gezogen",
"vcmi.adventureOptions.smoothDragging.hover" : "Nahtloses Ziehen der Karte",
"vcmi.adventureOptions.smoothDragging.help" : "{Nahtloses Ziehen der Karte}\n\nWenn aktiviert hat das Ziehen der Karte einen sanften Auslaufeffekt.",
"vcmi.adventureOptions.mapScrollSpeed1.hover": "",
"vcmi.adventureOptions.mapScrollSpeed5.hover": "",
"vcmi.adventureOptions.mapScrollSpeed6.hover": "",

View File

@ -126,6 +126,10 @@ AdventureOptionsTab::AdventureOptionsTab()
{
return setBoolSetting("adventure", "leftButtonDrag", value);
});
addCallback("smoothDraggingChanged", [](bool value)
{
return setBoolSetting("adventure", "smoothDragging", value);
});
build(config);
std::shared_ptr<CToggleGroup> playerHeroSpeedToggle = widget<CToggleGroup>("heroMovementSpeedPicker");
@ -164,4 +168,8 @@ AdventureOptionsTab::AdventureOptionsTab()
std::shared_ptr<CToggleButton> leftButtonDragCheckbox = widget<CToggleButton>("leftButtonDragCheckbox");
if (leftButtonDragCheckbox)
leftButtonDragCheckbox->setSelected(settings["adventure"]["leftButtonDrag"].Bool());
std::shared_ptr<CToggleButton> smoothDraggingCheckbox = widget<CToggleButton>("smoothDraggingCheckbox");
if (smoothDraggingCheckbox)
smoothDraggingCheckbox->setSelected(settings["adventure"]["smoothDragging"].Bool());
}

View File

@ -391,6 +391,11 @@
"help": "vcmi.adventureOptions.leftButtonDrag",
"callback": "leftButtonDragChanged",
"created" : "desktop"
},
{
"name": "smoothDraggingCheckbox",
"help": "vcmi.adventureOptions.smoothDragging",
"callback": "smoothDraggingChanged"
}
]
}