Fix city state diplomacy popup title.

This commit is contained in:
Duan Tao 2019-05-05 11:18:33 +08:00 committed by Yair Morgenstern
parent 2263f0c098
commit 3292e41977
2 changed files with 14 additions and 3 deletions

View File

@ -74,7 +74,7 @@ class DiplomacyScreen:CameraStageBaseScreen() {
diplomacyTable.defaults().pad(10f)
val leaderName: String
if (otherCiv.isCityState()) {
leaderName = otherCiv.civName
leaderName = "City state [" + otherCiv.civName + "]"
} else {
leaderName = "[" + otherCiv.getNation().leaderName + "] of [" + otherCiv.civName + "]"
}
@ -102,7 +102,12 @@ class DiplomacyScreen:CameraStageBaseScreen() {
diplomacyManager.declareWar()
val responsePopup = PopupTable(this)
val otherCivLeaderName = otherCiv.getNation().leaderName + " of " + otherCiv.civName
val otherCivLeaderName: String
if (otherCiv.isCityState()) {
otherCivLeaderName = "City state [" + otherCiv.civName + "]"
} else {
otherCivLeaderName = "[" + otherCiv.getNation().leaderName + "] of [" + otherCiv.civName + "]"
}
responsePopup.add(otherCivLeaderName.toLabel())
responsePopup.addSeparator()
responsePopup.addGoodSizedLabel(otherCiv.getNation().attacked).row()

View File

@ -19,7 +19,13 @@ class AlertPopup(val worldScreen: WorldScreen, val popupAlert: PopupAlert): Popu
}
fun addLeaderName(translatedNation: Nation){
val otherCivLeaderName = "[${translatedNation.leaderName}] of [${translatedNation.getNameTranslation()}]".tr()
val otherCivLeaderName: String
if (translatedNation.isCityState()) {
otherCivLeaderName = "City state [${translatedNation.getNameTranslation()}]".tr()
} else {
otherCivLeaderName = "[${translatedNation.leaderName}] of [${translatedNation.getNameTranslation()}]".tr()
}
add(otherCivLeaderName.toLabel())
addSeparator()
}