Next turn button reactivates after closing a popup menu (#11267)

This commit is contained in:
Oskar Niesen 2024-03-09 15:05:39 -06:00 committed by GitHub
parent 41b29256fe
commit b10ed5ff87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -22,6 +22,11 @@ class AutoPlayMenu(
) : AnimatedMenuPopup(stage, getActorTopRight(positionNextTo)) {
private val settings = GUI.getSettings()
init {
// We need to activate the end turn button again after the menu closes
afterCloseCallback = { worldScreen.shouldUpdate = true }
}
override fun createContentTable(): Table {
val table = super.createContentTable()!!
// Using the same keyboard binding for bypassing this menu and the default option

View File

@ -13,6 +13,12 @@ class NextTurnMenu(
private val nextTurnButton: NextTurnButton,
private val worldScreen: WorldScreen
) : AnimatedMenuPopup(stage, getActorTopRight(positionNextTo)) {
init {
// We need to activate the end turn button again after the menu closes
afterCloseCallback = { worldScreen.shouldUpdate = true }
}
override fun createContentTable(): Table {
val table = super.createContentTable()!!
table.add(getButton("Next Turn", KeyboardBinding.NextTurnMenuNextTurn) {