Resolved #1426 - starting a new game from a file-map game shows new correct options on the new game screen
This commit is contained in:
parent
440941cdea
commit
9f3a943865
2 changed files with 23 additions and 16 deletions
|
@ -21,8 +21,8 @@ android {
|
|||
applicationId "com.unciv.app"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 29
|
||||
versionCode 336
|
||||
versionName "3.3.5"
|
||||
versionCode 337
|
||||
versionName "3.3.6"
|
||||
}
|
||||
|
||||
// Had to add this crap for Travis to build, it wanted to sign the app
|
||||
|
|
|
@ -98,8 +98,7 @@ class NewGameScreenOptionsTable(val newGameParameters: GameParameters, val rules
|
|||
val worldSizeSelectBox = getWorldSizeSelectBox()
|
||||
val worldSizeLabel = "{World size}:".toLabel()
|
||||
|
||||
mapTypeSelectBox.addListener(object : ChangeListener() {
|
||||
override fun changed(event: ChangeEvent?, actor: Actor?) {
|
||||
fun updateOnMapTypeChange(){
|
||||
newGameParameters.mapType = mapTypeSelectBox.selected.value
|
||||
if (newGameParameters.mapType == MapType.file) {
|
||||
worldSizeSelectBox.isVisible = false
|
||||
|
@ -115,7 +114,15 @@ class NewGameScreenOptionsTable(val newGameParameters: GameParameters, val rules
|
|||
newGameParameters.mapFileName = null
|
||||
}
|
||||
}
|
||||
|
||||
updateOnMapTypeChange() // activate once, so when we had a file map before we'll have the right things set for another one
|
||||
|
||||
mapTypeSelectBox.addListener(object : ChangeListener() {
|
||||
override fun changed(event: ChangeEvent?, actor: Actor?) {
|
||||
updateOnMapTypeChange()
|
||||
}
|
||||
})
|
||||
|
||||
add(mapTypeSelectBox).pad(10f).row()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue