Better icons in unit description table - see #12591

This commit is contained in:
yairm210 2024-12-13 10:07:45 +02:00
parent 8519453d19
commit 6c4965aaee

View File

@ -170,23 +170,16 @@ class UnitTable(val worldScreen: WorldScreen) : Table() {
unitDescriptionTable.clear()
unitDescriptionTable.defaults().pad(2f)
unitDescriptionTable.add(ImageGetter.getStatIcon("Movement")).size(20f)
unitDescriptionTable.add(unit.getMovementString()).padRight(10f)
unitDescriptionTable.add(Fonts.movement + unit.getMovementString()).padRight(10f)
if (!unit.isCivilian()) {
unitDescriptionTable.add(ImageGetter.getStatIcon("Strength")).size(20f)
unitDescriptionTable.add(unit.baseUnit.strength.tr()).padRight(10f)
}
if (!unit.isCivilian())
unitDescriptionTable.add(Fonts.strength + unit.baseUnit.strength.tr()).padRight(10f)
if (unit.baseUnit.rangedStrength != 0) {
unitDescriptionTable.add(ImageGetter.getStatIcon("RangedStrength")).size(20f)
unitDescriptionTable.add(unit.baseUnit.rangedStrength.tr()).padRight(10f)
}
if (unit.baseUnit.rangedStrength != 0)
unitDescriptionTable.add(Fonts.rangedStrength + unit.baseUnit.rangedStrength.tr()).padRight(10f)
if (unit.baseUnit.isRanged()) {
unitDescriptionTable.add(ImageGetter.getStatIcon("Range")).size(20f)
unitDescriptionTable.add(unit.getRange().tr()).padRight(10f)
}
if (unit.baseUnit.isRanged())
unitDescriptionTable.add(Fonts.range + unit.getRange().tr()).padRight(10f)
val interceptionRange = unit.getInterceptionRange()
if (interceptionRange > 0) {