mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-13 08:14:29 +07:00
Next turn button reactivates after closing a popup menu (#11267)
This commit is contained in:
parent
41b29256fe
commit
b10ed5ff87
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user