mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 01:08:25 +07:00
Show garrison in city screen, so that it's easier to decide whether one should produce a military unit. (#9202)
This commit is contained in:
@ -4,6 +4,7 @@ import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.scenes.scene2d.Touchable
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||
import com.badlogic.gdx.utils.Align
|
||||
import com.unciv.ui.components.UnitGroup
|
||||
import com.unciv.ui.components.extensions.onClick
|
||||
import com.unciv.ui.components.extensions.toLabel
|
||||
import com.unciv.ui.images.ImageGetter
|
||||
@ -66,6 +67,11 @@ class CityScreenCityPickerTable(private val cityScreen: CityScreen) : Table() {
|
||||
|
||||
cityNameTable.add(currentCityLabel)
|
||||
|
||||
val garrison = city.getGarrison()
|
||||
if (garrison != null) {
|
||||
cityNameTable.add(UnitGroup(garrison, 30f)).padLeft(5f)
|
||||
}
|
||||
|
||||
add(cityNameTable).width(stage.width / 4)
|
||||
|
||||
if (civInfo.cities.size > 1) {
|
||||
|
Reference in New Issue
Block a user