mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
City state icon in city button now visible and colored according to city-state color
This commit is contained in:
parent
f46baec89f
commit
fd4123e15f
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 |
@ -14,7 +14,7 @@ class Nation : INamed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var leaderName=""
|
var leaderName=""
|
||||||
fun getLeaderDisplayName() = if(isCityState()) "City-state [${getNameTranslation()}]".tr()
|
fun getLeaderDisplayName() = if(isCityState()) getNameTranslation()
|
||||||
else "[$leaderName] of [${getNameTranslation()}]"
|
else "[$leaderName] of [${getNameTranslation()}]"
|
||||||
|
|
||||||
var cityStateType: CityStateType?=null
|
var cityStateType: CityStateType?=null
|
||||||
|
@ -81,7 +81,8 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
|
|||||||
}
|
}
|
||||||
if (city.isCapital()) {
|
if (city.isCapital()) {
|
||||||
if (city.civInfo.isCityState()) {
|
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)
|
iconTable.add(cityStateImage).size(20f).pad(2f).padLeft(10f)
|
||||||
} else {
|
} else {
|
||||||
val starImage = ImageGetter.getImage("OtherIcons/Star.png").apply { color = Color.LIGHT_GRAY }
|
val starImage = ImageGetter.getImage("OtherIcons/Star.png").apply { color = Color.LIGHT_GRAY }
|
||||||
|
@ -56,6 +56,7 @@ class DiplomacyScreen:CameraStageBaseScreen() {
|
|||||||
val cityStateIcon = ImageGetter.getImage("OtherIcons/CityState.png")
|
val cityStateIcon = ImageGetter.getImage("OtherIcons/CityState.png")
|
||||||
cityStateIcon.setSize(70f,70f)
|
cityStateIcon.setSize(70f,70f)
|
||||||
cityStateIcon.center(civIndicator)
|
cityStateIcon.center(civIndicator)
|
||||||
|
cityStateIcon.color= Color.BLACK
|
||||||
civIndicator.addActor(cityStateIcon)
|
civIndicator.addActor(cityStateIcon)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user