City state icon in city button now visible and colored according to city-state color

This commit is contained in:
Yair Morgenstern 2019-05-20 22:22:16 +03:00
parent f46baec89f
commit fd4123e15f
5 changed files with 4 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 988 KiB

After

Width:  |  Height:  |  Size: 988 KiB

View File

@ -14,7 +14,7 @@ class Nation : INamed {
}
var leaderName=""
fun getLeaderDisplayName() = if(isCityState()) "City-state [${getNameTranslation()}]".tr()
fun getLeaderDisplayName() = if(isCityState()) getNameTranslation()
else "[$leaderName] of [${getNameTranslation()}]"
var cityStateType: CityStateType?=null

View File

@ -81,7 +81,8 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
}
if (city.isCapital()) {
if (city.civInfo.isCityState()) {
val cityStateImage = ImageGetter.getImage("OtherIcons/CityState.png").apply { color = Color.LIGHT_GRAY }
val cityStateImage = ImageGetter.getImage("OtherIcons/CityState.png")
.apply { color = city.civInfo.getNation().getSecondaryColor()}
iconTable.add(cityStateImage).size(20f).pad(2f).padLeft(10f)
} else {
val starImage = ImageGetter.getImage("OtherIcons/Star.png").apply { color = Color.LIGHT_GRAY }

View File

@ -56,6 +56,7 @@ class DiplomacyScreen:CameraStageBaseScreen() {
val cityStateIcon = ImageGetter.getImage("OtherIcons/CityState.png")
cityStateIcon.setSize(70f,70f)
cityStateIcon.center(civIndicator)
cityStateIcon.color= Color.BLACK
civIndicator.addActor(cityStateIcon)
}