Resolved #9669 - city name translation for conquered popup does not get icon

This commit is contained in:
Yair Morgenstern 2023-06-26 22:08:41 +03:00
parent 6a8f4914b8
commit 0536c5f24b
3 changed files with 6 additions and 7 deletions

View File

@ -102,11 +102,11 @@ class CityInfoConquestFunctions(val city: City){
conqueringCiv.addNotification("Received [$goldPlundered] Gold for capturing [$name]",
getCenterTile().position, NotificationCategory.General, NotificationIcon.Gold)
val reconqueredCityWhileStillInResistance = previousOwner == conqueringCiv.civName && isInResistance()
val reconqueredCityWhileStillInResistance = previousOwner == receivingCiv.civName && isInResistance()
destroyBuildingsOnCapture()
this@CityInfoConquestFunctions.moveToCiv(receivingCiv)
moveToCiv(receivingCiv)
Battle.destroyIfDefeated(conqueredCiv, conqueringCiv)
@ -326,8 +326,7 @@ class CityInfoConquestFunctions(val city: City){
cityStats.update()
// Update proximity rankings
civ.updateProximity(oldCiv,
oldCiv.updateProximity(civ))
civ.updateProximity(oldCiv, oldCiv.updateProximity(civ))
// Update history
city.getTiles().forEach { tile ->

View File

@ -266,8 +266,8 @@ open class Popup(
* @param text The caption text.
* @param size The font size for the label.
*/
fun addGoodSizedLabel(text: String, size: Int = Constants.defaultFontSize): Cell<Label> {
val label = text.toLabel(fontSize = size)
fun addGoodSizedLabel(text: String, size: Int = Constants.defaultFontSize, hideIcons:Boolean = false): Cell<Label> {
val label = text.toLabel(fontSize = size, hideIcons = hideIcons)
label.wrap = true
label.setAlignment(Align.center)
return add(label).width(stageToShowOn.width / 2)

View File

@ -381,7 +381,7 @@ class AlertPopup(
private fun addQuestionAboutTheCity(cityName: String) {
addGoodSizedLabel("What would you like to do with the city of [$cityName]?",
Constants.headingFontSize).padBottom(20f).row()
Constants.headingFontSize, hideIcons = true).padBottom(20f).row()
}
private fun addDestroyOption(destroyAction: () -> Unit) {