Fix City plates aircraft table shape (#8332)

Co-authored-by: tunerzinc@gmail.com <vfylfhby>
This commit is contained in:
vegeta1k95 2023-01-08 10:49:09 +01:00 committed by GitHub
parent 4d8f056df7
commit ecd52feaf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,13 +172,18 @@ class CityButton(val city: CityInfo, private val tileGroup: WorldTileGroup): Tab
private fun addAirUnitTable() {
if (!showAdditionalInfoTags || tileGroup.tileInfo.airUnits.isEmpty()) return
val secondaryColor = city.civInfo.nation.getInnerColor()
val airUnitTable = Table()
airUnitTable.background = BaseScreen.skinStrings.getUiBackground("WorldScreen/CityButton/AirUnitTable", BaseScreen.skinStrings.roundedEdgeRectangleShape, city.civInfo.nation.getOuterColor()).apply { setMinSize(0f,0f) }
val airUnitTable = BorderedTable(
path="WorldScreen/CityButton/AirUnitTable",
defaultInner = BaseScreen.skinStrings.roundedEdgeRectangleSmallShape,
defaultBorder = BaseScreen.skinStrings.roundedEdgeRectangleSmallShape,
innerColor = city.civInfo.nation.getOuterColor(),
borderColor = city.civInfo.nation.getOuterColor()
)
val aircraftImage = ImageGetter.getImage("OtherIcons/Aircraft")
aircraftImage.color = secondaryColor
airUnitTable.add(aircraftImage).size(15f)
airUnitTable.add(tileGroup.tileInfo.airUnits.size.toString().toLabel(secondaryColor,14))
add(airUnitTable).row()
add(airUnitTable).padBottom(5f).minWidth(50f).row()
}
private fun belongsToViewingCiv() = city.civInfo == worldScreen.viewingCiv