mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04: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:
parent
d25804ffb5
commit
ccf37af468
@ -4,6 +4,7 @@ import com.badlogic.gdx.graphics.Color
|
|||||||
import com.badlogic.gdx.scenes.scene2d.Touchable
|
import com.badlogic.gdx.scenes.scene2d.Touchable
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||||
import com.badlogic.gdx.utils.Align
|
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.onClick
|
||||||
import com.unciv.ui.components.extensions.toLabel
|
import com.unciv.ui.components.extensions.toLabel
|
||||||
import com.unciv.ui.images.ImageGetter
|
import com.unciv.ui.images.ImageGetter
|
||||||
@ -66,6 +67,11 @@ class CityScreenCityPickerTable(private val cityScreen: CityScreen) : Table() {
|
|||||||
|
|
||||||
cityNameTable.add(currentCityLabel)
|
cityNameTable.add(currentCityLabel)
|
||||||
|
|
||||||
|
val garrison = city.getGarrison()
|
||||||
|
if (garrison != null) {
|
||||||
|
cityNameTable.add(UnitGroup(garrison, 30f)).padLeft(5f)
|
||||||
|
}
|
||||||
|
|
||||||
add(cityNameTable).width(stage.width / 4)
|
add(cityNameTable).width(stage.width / 4)
|
||||||
|
|
||||||
if (civInfo.cities.size > 1) {
|
if (civInfo.cities.size > 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user