mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-10 19:09:06 +07:00
Added option for confirmation when clicking "next turn" button (#6925)
This commit is contained in:
parent
4eaf3c8355
commit
93afb26c62
@ -656,6 +656,7 @@ Show unit movement arrows =
|
||||
Continuous rendering =
|
||||
When disabled, saves battery life but certain animations will be suspended =
|
||||
Order trade offers by amount =
|
||||
Ask for confirmation when pressing next turn =
|
||||
Check extension mods based on: =
|
||||
-none- =
|
||||
Reload mods =
|
||||
@ -808,6 +809,7 @@ Waiting for other players... =
|
||||
Waiting for [civName]... =
|
||||
in =
|
||||
Next turn =
|
||||
Confirm next turn =
|
||||
Move automated units =
|
||||
[currentPlayerCiv] ready? =
|
||||
1 turn =
|
||||
|
@ -48,6 +48,7 @@ class GameSettings {
|
||||
var multiplayerTurnCheckerPersistentNotificationEnabled = true
|
||||
var multiplayerTurnCheckerDelayInMinutes = 5
|
||||
var orderTradeOffersByAmount = true
|
||||
var confirmNextTurn = false
|
||||
var windowState = WindowState()
|
||||
var isFreshlyCreated = false
|
||||
var visualMods = HashSet<String>()
|
||||
|
@ -33,4 +33,5 @@ fun gameplayTab(
|
||||
settings.automatedWorkersReplaceImprovements
|
||||
) { settings.automatedWorkersReplaceImprovements = it }
|
||||
optionsPopup.addCheckbox(this, "Order trade offers by amount", settings.orderTradeOffersByAmount) { settings.orderTradeOffersByAmount = it }
|
||||
}
|
||||
optionsPopup.addCheckbox(this, "Ask for confirmation when pressing next turn", settings.confirmNextTurn) { settings.confirmNextTurn = it }
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ import com.unciv.ui.pickerscreens.*
|
||||
import com.unciv.ui.popup.ExitGamePopup
|
||||
import com.unciv.ui.popup.Popup
|
||||
import com.unciv.ui.popup.ToastPopup
|
||||
import com.unciv.ui.popup.YesNoPopup
|
||||
import com.unciv.ui.popup.hasOpenPopups
|
||||
import com.unciv.ui.saves.LoadGameScreen
|
||||
import com.unciv.ui.saves.SaveGameScreen
|
||||
@ -822,8 +823,15 @@ class WorldScreen(val gameInfo: GameInfo, val viewingCiv:CivilizationInfo) : Bas
|
||||
|
||||
else ->
|
||||
NextTurnAction("${Fonts.turn}{Next turn}", Color.WHITE) {
|
||||
game.settings.addCompletedTutorialTask("Pass a turn")
|
||||
nextTurn()
|
||||
val action = {
|
||||
game.settings.addCompletedTutorialTask("Pass a turn")
|
||||
nextTurn()
|
||||
}
|
||||
if (game.settings.confirmNextTurn) {
|
||||
YesNoPopup("Confirm next turn", action, this).open()
|
||||
} else {
|
||||
action()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user