mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-11 11:28:03 +07:00
Fix next turn button disabled after leaving sub-screens from menu (#6261)
This commit is contained in:
parent
e7fc1a565f
commit
9f9e8c33c5
@ -15,20 +15,38 @@ class WorldScreenMenuPopup(val worldScreen: WorldScreen) : Popup(worldScreen) {
|
|||||||
init {
|
init {
|
||||||
defaults().fillX()
|
defaults().fillX()
|
||||||
|
|
||||||
addButton("Main menu") { worldScreen.game.setScreen(MainMenuScreen()) }
|
addButton("Main menu") {
|
||||||
addButton("Civilopedia") { worldScreen.game.setScreen(CivilopediaScreen(worldScreen.gameInfo.ruleSet, worldScreen)) }
|
worldScreen.game.setScreen(MainMenuScreen())
|
||||||
addButton("Save game") { worldScreen.game.setScreen(SaveGameScreen(worldScreen.gameInfo)) }
|
}
|
||||||
addButton("Load game") { worldScreen.game.setScreen(LoadGameScreen(worldScreen)) }
|
addButton("Civilopedia") {
|
||||||
|
close()
|
||||||
|
worldScreen.game.setScreen(CivilopediaScreen(worldScreen.gameInfo.ruleSet, worldScreen))
|
||||||
|
}
|
||||||
|
addButton("Save game") {
|
||||||
|
close()
|
||||||
|
worldScreen.game.setScreen(SaveGameScreen(worldScreen.gameInfo))
|
||||||
|
}
|
||||||
|
addButton("Load game") {
|
||||||
|
close()
|
||||||
|
worldScreen.game.setScreen(LoadGameScreen(worldScreen))
|
||||||
|
}
|
||||||
|
|
||||||
addButton("Start new game") {
|
addButton("Start new game") {
|
||||||
|
close()
|
||||||
val newGameSetupInfo = GameSetupInfo(worldScreen.gameInfo)
|
val newGameSetupInfo = GameSetupInfo(worldScreen.gameInfo)
|
||||||
newGameSetupInfo.mapParameters.reseed()
|
newGameSetupInfo.mapParameters.reseed()
|
||||||
val newGameScreen = NewGameScreen(worldScreen, newGameSetupInfo)
|
val newGameScreen = NewGameScreen(worldScreen, newGameSetupInfo)
|
||||||
worldScreen.game.setScreen(newGameScreen)
|
worldScreen.game.setScreen(newGameScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
addButton("Victory status") { worldScreen.game.setScreen(VictoryScreen(worldScreen)) }
|
addButton("Victory status") {
|
||||||
addButton("Options") { worldScreen.openOptionsPopup() }
|
close()
|
||||||
|
worldScreen.game.setScreen(VictoryScreen(worldScreen))
|
||||||
|
}
|
||||||
|
addButton("Options") {
|
||||||
|
close()
|
||||||
|
worldScreen.openOptionsPopup()
|
||||||
|
}
|
||||||
addButton("Community") {
|
addButton("Community") {
|
||||||
close()
|
close()
|
||||||
WorldScreenCommunityPopup(worldScreen).open(force = true)
|
WorldScreenCommunityPopup(worldScreen).open(force = true)
|
||||||
|
Loading…
Reference in New Issue
Block a user