mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 21:30:20 +07:00
More PopupTable.close() uses
This commit is contained in:
@ -21,8 +21,8 @@ android {
|
|||||||
applicationId "com.unciv.app"
|
applicationId "com.unciv.app"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 289
|
versionCode 290
|
||||||
versionName "2.19.8"
|
versionName "2.19.9"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Had to add this crap for Travis to build, it wanted to sign the app
|
// Had to add this crap for Travis to build, it wanted to sign the app
|
||||||
|
@ -41,16 +41,16 @@ class CityScreenCityPickerTable(val cityScreen: CityScreen) : Table(){
|
|||||||
val currentCityLabel = Label(city.name + " (" + city.population.population + ")", CameraStageBaseScreen.skin)
|
val currentCityLabel = Label(city.name + " (" + city.population.population + ")", CameraStageBaseScreen.skin)
|
||||||
currentCityLabel.setFontSize(25)
|
currentCityLabel.setFontSize(25)
|
||||||
currentCityLabel.onClick {
|
currentCityLabel.onClick {
|
||||||
val popup = PopupTable(cityScreen)
|
val editCityNamePopup = PopupTable(cityScreen)
|
||||||
val textArea = TextField(city.name, CameraStageBaseScreen.skin)
|
val textArea = TextField(city.name, CameraStageBaseScreen.skin)
|
||||||
textArea.setAlignment(Align.center)
|
textArea.setAlignment(Align.center)
|
||||||
popup.add(textArea).colspan(2).row()
|
editCityNamePopup.add(textArea).colspan(2).row()
|
||||||
popup.addButton("Close".tr()){popup.remove()}
|
editCityNamePopup.addButton("Close".tr()){editCityNamePopup.close()}
|
||||||
popup.addButton("Save".tr()){
|
editCityNamePopup.addButton("Save".tr()){
|
||||||
city.name = textArea.text
|
city.name = textArea.text
|
||||||
cityScreen.game.screen = CityScreen(city)
|
cityScreen.game.screen = CityScreen(city)
|
||||||
}
|
}
|
||||||
popup.open()
|
editCityNamePopup.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
cityNameTable.add(currentCityLabel)
|
cityNameTable.add(currentCityLabel)
|
||||||
|
@ -40,12 +40,12 @@ class LoadGameScreen : PickerScreen() {
|
|||||||
UnCivGame.Current.loadGame(selectedSave)
|
UnCivGame.Current.loadGame(selectedSave)
|
||||||
}
|
}
|
||||||
catch (ex:Exception){
|
catch (ex:Exception){
|
||||||
val popup = PopupTable(this)
|
val cantLoadGamePopup = PopupTable(this)
|
||||||
popup.addGoodSizedLabel("It looks like your saved game can't be loaded!").row()
|
cantLoadGamePopup.addGoodSizedLabel("It looks like your saved game can't be loaded!").row()
|
||||||
popup.addGoodSizedLabel("If you could copy your game data (\"Copy saved game to clipboard\" - ").row()
|
cantLoadGamePopup.addGoodSizedLabel("If you could copy your game data (\"Copy saved game to clipboard\" - ").row()
|
||||||
popup.addGoodSizedLabel(" paste into an email to yairm210@hotmail.com)").row()
|
cantLoadGamePopup.addGoodSizedLabel(" paste into an email to yairm210@hotmail.com)").row()
|
||||||
popup.addGoodSizedLabel("I could maybe help you figure out what went wrong, since this isn't supposed to happen!").row()
|
cantLoadGamePopup.addGoodSizedLabel("I could maybe help you figure out what went wrong, since this isn't supposed to happen!").row()
|
||||||
popup.open()
|
cantLoadGamePopup.open()
|
||||||
ex.printStackTrace()
|
ex.printStackTrace()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,14 +171,14 @@ class BattleTable(val worldScreen: WorldScreen): Table() {
|
|||||||
worldScreen.shouldUpdate = true
|
worldScreen.shouldUpdate = true
|
||||||
}
|
}
|
||||||
catch (ex:Exception){
|
catch (ex:Exception){
|
||||||
val popup = PopupTable(worldScreen)
|
val battleBugPopup = PopupTable(worldScreen)
|
||||||
popup.addGoodSizedLabel("You've encountered a bug that I've been looking for for a while!").row()
|
battleBugPopup.addGoodSizedLabel("You've encountered a bug that I've been looking for for a while!").row()
|
||||||
popup.addGoodSizedLabel("If you could copy your game data (\"Copy saved game to clipboard\" - ").row()
|
battleBugPopup.addGoodSizedLabel("If you could copy your game data (\"Copy saved game to clipboard\" - ").row()
|
||||||
popup.addGoodSizedLabel(" paste into an email to yairm210@hotmail.com)").row()
|
battleBugPopup.addGoodSizedLabel(" paste into an email to yairm210@hotmail.com)").row()
|
||||||
popup.addGoodSizedLabel("It would help me figure out what went wrong, since this isn't supposed to happen!").row()
|
battleBugPopup.addGoodSizedLabel("It would help me figure out what went wrong, since this isn't supposed to happen!").row()
|
||||||
popup.addGoodSizedLabel("If you could tell me which unit was selected and which unit you tried to attack,").row()
|
battleBugPopup.addGoodSizedLabel("If you could tell me which unit was selected and which unit you tried to attack,").row()
|
||||||
popup.addGoodSizedLabel(" that would be even better!").row()
|
battleBugPopup.addGoodSizedLabel(" that would be even better!").row()
|
||||||
popup.open()
|
battleBugPopup.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user