mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-21 21:17:49 +02:00
Added option to disable edge scrolling
This commit is contained in:
parent
ec55ec76b6
commit
6283329aeb
@ -64,8 +64,6 @@
|
||||
"vcmi.adventureOptions.forceMovementInfo.help" : "{在状态栏中显示移动力}\n\n不需要按ALT就可以显示移动力。",
|
||||
"vcmi.adventureOptions.showGrid.hover" : "显示网格",
|
||||
"vcmi.adventureOptions.showGrid.help" : "{显示网格}\n\n显示网格覆盖层,高亮冒险地图物件的边沿。",
|
||||
"vcmi.adventureOptions.mapSwipe.hover" : "地图拖动/镜头",
|
||||
"vcmi.adventureOptions.mapSwipe.help" : "{地图拖动/镜头}\n\n在触摸屏设备上,你可以用手指轻扫来移动地图。使用鼠标时,按住鼠标左键或中键移动地图。",
|
||||
"vcmi.adventureOptions.mapScrollSpeed1.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed5.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed6.hover": "",
|
||||
@ -88,8 +86,6 @@
|
||||
"vcmi.battleOptions.animationsSpeed1.help": "设置动画速度为非常慢",
|
||||
"vcmi.battleOptions.animationsSpeed5.help": "设置动画速度为非常快",
|
||||
"vcmi.battleOptions.animationsSpeed6.help": "设置动画速度为即刻",
|
||||
"vcmi.battleOptions.touchscreenMode.hover": "触屏模式",
|
||||
"vcmi.battleOptions.touchscreenMode.help": "{触屏模式}\n\n当启用时,需要进行双击进行确认和执行动作。减少触屏设备误触。",
|
||||
"vcmi.battleOptions.movementHighlightOnHover.hover": "鼠标悬停高亮单位移动范围",
|
||||
"vcmi.battleOptions.movementHighlightOnHover.help": "{鼠标悬停高亮单位移动范围}\n\n当你的鼠标悬停在单位上时高亮他的行动范围。",
|
||||
"vcmi.battleOptions.skipBattleIntroMusic.hover": "跳过战斗开始音乐",
|
||||
|
@ -78,8 +78,8 @@
|
||||
"vcmi.adventureOptions.forceMovementInfo.help" : "{Always Show Movement Cost}\n\nAlways show movement points data in status bar information. (Instead of viewing it only while you hold down ALT key)",
|
||||
"vcmi.adventureOptions.showGrid.hover" : "Show Grid",
|
||||
"vcmi.adventureOptions.showGrid.help" : "{Show Grid}\n\nShow the grid overlay, highlighting the borders between adventure map tiles.",
|
||||
"vcmi.adventureOptions.mapSwipe.hover" : "Map Swipe/Panning",
|
||||
"vcmi.adventureOptions.mapSwipe.help" : "{Map Swipe/Panning}\n\nOn touchscreen devices, you can move the map by swiping with your finger. To pan the map using the mouse, hold down the left or middle mouse button and move the mouse.",
|
||||
"vcmi.adventureOptions.borderScroll.hover" : "Border Scrolling",
|
||||
"vcmi.adventureOptions.borderScroll.help" : "{Border Scrolling}\n\nScroll adventure map when cursor is adjacent to window edge. Can be disabled by holding down CTRL key.",
|
||||
"vcmi.adventureOptions.mapScrollSpeed1.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed5.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed6.hover": "",
|
||||
@ -102,8 +102,6 @@
|
||||
"vcmi.battleOptions.animationsSpeed1.help": "Set animation speed to very slow",
|
||||
"vcmi.battleOptions.animationsSpeed5.help": "Set animation speed to very fast",
|
||||
"vcmi.battleOptions.animationsSpeed6.help": "Set animation speed to instantaneous",
|
||||
"vcmi.battleOptions.touchscreenMode.hover": "Touchscreen mode",
|
||||
"vcmi.battleOptions.touchscreenMode.help": "{Touchscreen mode}\n\nIf enabled, second click is required to confirm and execute action. This is more suitable for touchscreen devices.",
|
||||
"vcmi.battleOptions.movementHighlightOnHover.hover": "Movement Highlight on Hover",
|
||||
"vcmi.battleOptions.movementHighlightOnHover.help": "{Movement Highlight on Hover}\n\nHighlight unit's movement range when you hover over it.",
|
||||
"vcmi.battleOptions.skipBattleIntroMusic.hover": "Skip Intro Music",
|
||||
|
@ -78,8 +78,6 @@
|
||||
"vcmi.adventureOptions.forceMovementInfo.help" : "{Bewegungskosten immer anzeigen}\n\n Ersetzt die Standardinformationen in der Statusleiste durch die Daten der Bewegungspunkte, ohne dass die ALT-Taste gedrückt werden muss.",
|
||||
"vcmi.adventureOptions.showGrid.hover" : "Raster anzeigen",
|
||||
"vcmi.adventureOptions.showGrid.help" : "{Raster anzeigen}\n\n Zeigt eine Rasterüberlagerung, die die Grenzen zwischen den Kacheln der Abenteuerkarte anzeigt.",
|
||||
"vcmi.adventureOptions.mapSwipe.hover" : "Karte wischen",
|
||||
"vcmi.adventureOptions.mapSwipe.help" : "{Karte wischen}\n\n Ermöglicht auf Systemen mit Touchscreen das Verschieben der Karte per Fingerwisch-Geste. Ab sofort kann auch über die linke Maustaste zugegriffen werden.",
|
||||
"vcmi.adventureOptions.mapScrollSpeed1.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed5.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed6.hover": "",
|
||||
|
@ -52,8 +52,6 @@
|
||||
"vcmi.adventureOptions.forceMovementInfo.help" : "{Zawsze pokazuj koszt ruchu}\n\n Zastępuje domyślne informacje paska statusu danymi o ruchu bez potrzeby przytrzymywania klawisza ALT.",
|
||||
"vcmi.adventureOptions.showGrid.hover" : "Pokaż siatkę",
|
||||
"vcmi.adventureOptions.showGrid.help" : "{Pokaż siatkę}\n\n Włącza siatkę pokazującą brzegi pól mapy przygody.",
|
||||
"vcmi.adventureOptions.mapSwipe.hover" : "Przeciąganie mapy",
|
||||
"vcmi.adventureOptions.mapSwipe.help" : "{Przeciąganie mapy}\n\n Pozwala przesuwać mapę przygody palcem dla systemów z ekranami dotykowymi. Obecnie pozwala też przesuwać mapę lewym przyciskiem myszy.",
|
||||
"vcmi.adventureOptions.mapScrollSpeed1.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed5.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed6.hover": "",
|
||||
|
@ -52,8 +52,6 @@
|
||||
"vcmi.adventureOptions.forceMovementInfo.help" : "{Всегда показывать стоимость перемещения}\n\n Заменить информацию в статусной строке на информацию о перемещении без необходимости нажатия {ALT}",
|
||||
"vcmi.adventureOptions.showGrid.hover" : "Сетка",
|
||||
"vcmi.adventureOptions.showGrid.help" : "{Сетка}\n\n Показывать сетку на видимой части карты.",
|
||||
"vcmi.adventureOptions.mapSwipe.hover" : "Перемещение карты жестами",
|
||||
"vcmi.adventureOptions.mapSwipe.help" : "{Перемещение карты жестами}\n\n Включает перемещение карты жестами на системах с сенсорным экраном. Сейчас также активируется левой кнопкой мыши.",
|
||||
"vcmi.adventureOptions.mapScrollSpeed1.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed5.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed6.hover": "",
|
||||
|
@ -61,8 +61,6 @@
|
||||
"vcmi.adventureOptions.forceMovementInfo.help": "{Mostrar siempre el coste de movimiento}\n\n Reemplaza la información predeterminada de la barra de estado con datos de puntos de movimiento sin necesidad de mantener presionado el botón ALT.",
|
||||
"vcmi.adventureOptions.showGrid.hover": "Mostrar cuadrícula",
|
||||
"vcmi.adventureOptions.showGrid.help": "{Mostrar cuadrícula}\n\n Muestra una superposición de cuadrícula que muestra las fronteras entre las casillas del mapa de aventuras.",
|
||||
"vcmi.adventureOptions.mapSwipe.hover": "Deslizamiento de mapa",
|
||||
"vcmi.adventureOptions.mapSwipe.help": "{Deslizamiento de mapa}\n\n Permite el movimiento del mapa mediante el gesto de deslizamiento con el dedo en sistemas con pantalla táctil. En este momento, también se puede acceder mediante el botón izquierdo del mouse.",
|
||||
"vcmi.adventureOptions.mapScrollSpeed1.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed5.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed6.hover": "",
|
||||
@ -85,8 +83,6 @@
|
||||
"vcmi.battleOptions.animationsSpeed1.help": "Establece la velocidad de animación como muy lenta.",
|
||||
"vcmi.battleOptions.animationsSpeed5.help": "Establece la velocidad de animación como muy rápida.",
|
||||
"vcmi.battleOptions.animationsSpeed6.help": "Establece la velocidad de animación como instantánea.",
|
||||
"vcmi.battleOptions.touchscreenMode.hover": "Modo pantalla táctil",
|
||||
"vcmi.battleOptions.touchscreenMode.help": "{Modo pantalla táctil}\n\nSi está habilitado, se requiere de un segundo clic para confirmar y ejecutar la acción. Adecuado para dispositivos con pantalla táctil.",
|
||||
"vcmi.battleOptions.movementHighlightOnHover.hover": "Resaltado de movimiento al pasar el ratón",
|
||||
"vcmi.battleOptions.movementHighlightOnHover.help": "{Resaltado de movimiento al pasar el ratón}\n\nResalta el rango de movimiento de la unidad cuando el cursor esta sobre esta.",
|
||||
"vcmi.battleOptions.skipBattleIntroMusic.hover": "Omitir música de introducción",
|
||||
|
@ -59,8 +59,8 @@
|
||||
"vcmi.adventureOptions.forceMovementInfo.help" : "{Завжди показувати вартість руху}\n\n Замінює стандартну інформацію в рядку стану на вартість переміщення без необхідності утримувати клавішу ALT.",
|
||||
"vcmi.adventureOptions.showGrid.hover" : "Показувати сітку",
|
||||
"vcmi.adventureOptions.showGrid.help" : "{Показувати сітку}\n\n Відображає сітку, що показує межі між клітинками на мапі пригод.",
|
||||
"vcmi.adventureOptions.mapSwipe.hover" : "Прокрутка мапи жестом",
|
||||
"vcmi.adventureOptions.mapSwipe.help" : "{Прокрутка мапи жестом}\n\n Дозволяє переміщати мапу пальцем на системах з сенсорним екраном. Станом на зараз, також доступний за допомогою лівої кнопки миші.",
|
||||
"vcmi.adventureOptions.borderScroll.hover" : "Прокрутка по краю",
|
||||
"vcmi.adventureOptions.borderScroll.help" : "{{Прокрутка по краю}\n\nПрокручувати мапу пригод, коли курсор знаходиться біля краю вікна. Цю функцію можна вимкнути, утримуючи клавішу CTRL.",
|
||||
"vcmi.adventureOptions.mapScrollSpeed1.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed5.hover": "",
|
||||
"vcmi.adventureOptions.mapScrollSpeed6.hover": "",
|
||||
|
@ -181,7 +181,7 @@ void AdventureMapInterface::handleMapScrollingUpdate(uint32_t timePassed)
|
||||
|
||||
bool cursorInScrollArea = scrollDelta != Point(0,0);
|
||||
bool scrollingActive = cursorInScrollArea && isActive() && shortcuts->optionSidePanelActive() && !scrollingWasBlocked;
|
||||
bool scrollingBlocked = GH.isKeyboardCtrlDown();
|
||||
bool scrollingBlocked = GH.isKeyboardCtrlDown() || !settings["adventure"]["borderScroll"].Bool();
|
||||
|
||||
if (!scrollingWasActive && scrollingBlocked)
|
||||
{
|
||||
|
@ -25,7 +25,10 @@ std::unique_ptr<ICursor> CursorHandler::createCursor()
|
||||
if (settings["video"]["cursor"].String() == "auto")
|
||||
{
|
||||
#if defined(VCMI_MOBILE)
|
||||
return std::make_unique<CursorSoftware>();
|
||||
if (settings["general"]["userRelativePointer"].Bool())
|
||||
return std::make_unique<CursorSoftware>();
|
||||
else
|
||||
return std::make_unique<CursorHardware>();
|
||||
#else
|
||||
return std::make_unique<CursorHardware>();
|
||||
#endif
|
||||
|
@ -102,11 +102,14 @@ AdventureOptionsTab::AdventureOptionsTab()
|
||||
{
|
||||
return setBoolSetting("gameTweaks", "showGrid", value);
|
||||
});
|
||||
|
||||
addCallback("infoBarPickChanged", [](bool value)
|
||||
{
|
||||
return setBoolSetting("gameTweaks", "infoBarPick", value);
|
||||
});
|
||||
addCallback("borderScrollChanged", [](bool value)
|
||||
{
|
||||
return setBoolSetting("adventure", "borderScroll", value);
|
||||
});
|
||||
build(config);
|
||||
|
||||
std::shared_ptr<CToggleGroup> playerHeroSpeedToggle = widget<CToggleGroup>("heroMovementSpeedPicker");
|
||||
@ -135,4 +138,7 @@ AdventureOptionsTab::AdventureOptionsTab()
|
||||
|
||||
std::shared_ptr<CToggleButton> infoBarPickCheckbox = widget<CToggleButton>("infoBarPickCheckbox");
|
||||
infoBarPickCheckbox->setSelected(settings["gameTweaks"]["infoBarPick"].Bool());
|
||||
|
||||
std::shared_ptr<CToggleButton> borderScrollCheckbox = widget<CToggleButton>("borderScrollCheckbox");
|
||||
borderScrollCheckbox->setSelected(settings["adventure"]["borderScroll"].Bool());
|
||||
}
|
||||
|
@ -173,7 +173,7 @@
|
||||
"type" : "object",
|
||||
"additionalProperties" : false,
|
||||
"default" : {},
|
||||
"required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "alwaysSkipCombat" ],
|
||||
"required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "alwaysSkipCombat", "borderScroll" ],
|
||||
"properties" : {
|
||||
"heroMoveTime" : {
|
||||
"type" : "number",
|
||||
@ -206,7 +206,12 @@
|
||||
"alwaysSkipCombat" : {
|
||||
"type" : "boolean",
|
||||
"default" : false
|
||||
}
|
||||
},
|
||||
"borderScroll" :
|
||||
{
|
||||
"type" : "boolean",
|
||||
"default" : true
|
||||
},
|
||||
}
|
||||
},
|
||||
"pathfinder" : {
|
||||
|
@ -336,10 +336,10 @@
|
||||
"text": "vcmi.adventureOptions.showGrid.hover"
|
||||
},
|
||||
{
|
||||
"text": "vcmi.adventureOptions.mapSwipe.hover"
|
||||
"text": "vcmi.adventureOptions.infoBarPick.hover"
|
||||
},
|
||||
{
|
||||
"text": "vcmi.adventureOptions.infoBarPick.hover"
|
||||
"text": "vcmi.adventureOptions.borderScroll.hover"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -364,15 +364,15 @@
|
||||
"help": "vcmi.adventureOptions.showGrid",
|
||||
"callback": "showGridChanged"
|
||||
},
|
||||
{
|
||||
"name": "mapSwipeCheckbox",
|
||||
"help": "vcmi.adventureOptions.mapSwipe",
|
||||
"callback": "mapSwipeChanged"
|
||||
},
|
||||
{
|
||||
"name": "infoBarPickCheckbox",
|
||||
"help": "vcmi.adventureOptions.infoBarPick",
|
||||
"callback": "infoBarPickChanged"
|
||||
},
|
||||
{
|
||||
"name": "borderScrollCheckbox",
|
||||
"help": "vcmi.adventureOptions.borderScroll",
|
||||
"callback": "borderScrollChanged"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user