mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Resolved #2503 - Resizing the game no longer returns you to the main menu
This commit is contained in:
parent
289bf62e99
commit
5a8b6fdb19
@ -152,7 +152,7 @@ class UncivGame(
|
|||||||
|
|
||||||
// Maybe this will solve the resume error on chrome OS, issue 322? Worth a shot
|
// Maybe this will solve the resume error on chrome OS, issue 322? Worth a shot
|
||||||
override fun resize(width: Int, height: Int) {
|
override fun resize(width: Int, height: Int) {
|
||||||
resume()
|
screen.resize(width, height)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun dispose() {
|
override fun dispose() {
|
||||||
|
@ -141,6 +141,12 @@ class MapEditorScreen(): CameraStageBaseScreen() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun resize(width: Int, height: Int) {
|
||||||
|
if (stage.viewport.screenWidth != width || stage.viewport.screenHeight != height) {
|
||||||
|
game.setScreen(MapEditorScreen(mapHolder.tileMap))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -572,7 +572,6 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
|
|
||||||
override fun resize(width: Int, height: Int) {
|
override fun resize(width: Int, height: Int) {
|
||||||
if (stage.viewport.screenWidth != width || stage.viewport.screenHeight != height) {
|
if (stage.viewport.screenWidth != width || stage.viewport.screenHeight != height) {
|
||||||
super.resize(width, height)
|
|
||||||
game.worldScreen = WorldScreen(viewingCiv) // start over.
|
game.worldScreen = WorldScreen(viewingCiv) // start over.
|
||||||
game.setWorldScreen()
|
game.setWorldScreen()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user