mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 12:54:06 -04:00
Added an option to disable move by long press (#11681)
* Added an option to disable move by long press * Moved setting check to tileGroup.onActivation and changed it to check for longTapMove * Added translation
This commit is contained in:
parent
4e28b9e75c
commit
9e6e157835
@ -801,6 +801,7 @@ Gameplay =
|
||||
Check for idle units =
|
||||
Auto Unit Cycle =
|
||||
Move units with a single tap =
|
||||
Move units with a long tap =
|
||||
Auto-assign city production =
|
||||
Auto-build roads =
|
||||
Automated workers replace improvements =
|
||||
|
@ -36,6 +36,7 @@ class GameSettings {
|
||||
var checkForDueUnits: Boolean = true
|
||||
var autoUnitCycle: Boolean = true
|
||||
var singleTapMove: Boolean = false
|
||||
var longTapMove: Boolean = true
|
||||
var language: String = Constants.english
|
||||
@Transient
|
||||
var locale: Locale? = null
|
||||
|
@ -19,6 +19,7 @@ fun gameplayTab(
|
||||
optionsPopup.addCheckbox(this, "Check for idle units", settings.checkForDueUnits, true) { settings.checkForDueUnits = it }
|
||||
optionsPopup.addCheckbox(this, "Auto Unit Cycle", settings.autoUnitCycle, true) { settings.autoUnitCycle = it }
|
||||
optionsPopup.addCheckbox(this, "Move units with a single tap", settings.singleTapMove) { settings.singleTapMove = it }
|
||||
optionsPopup.addCheckbox(this, "Move units with a long tap", settings.longTapMove) { settings.longTapMove = it }
|
||||
optionsPopup.addCheckbox(this, "Auto-assign city production", settings.autoAssignCityProduction, true) { shouldAutoAssignCityProduction ->
|
||||
settings.autoAssignCityProduction = shouldAutoAssignCityProduction
|
||||
val worldScreen = GUI.getWorldScreenIfActive()
|
||||
|
@ -149,6 +149,7 @@ class WorldMapHolder(
|
||||
ActivationTypes.Longpress else ActivationTypes.RightClick,
|
||||
noEquivalence = true
|
||||
) {
|
||||
if (!UncivGame.Current.settings.longTapMove) return@onActivation
|
||||
val unit = worldScreen.bottomUnitTable.selectedUnit
|
||||
?: return@onActivation
|
||||
Concurrency.run("WorldScreenClick") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user