From 2f6139e38dc536534b0c5f315cb8906bdc19ae0b Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Thu, 24 May 2018 22:35:57 +0300 Subject: [PATCH] Current construction always appears in picker screen and is colored green for indication --- .../com/unciv/ui/pickerscreens/ConstructionPickerScreen.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/ui/pickerscreens/ConstructionPickerScreen.kt b/core/src/com/unciv/ui/pickerscreens/ConstructionPickerScreen.kt index 7eaa129d7f..3db3c261fe 100644 --- a/core/src/com/unciv/ui/pickerscreens/ConstructionPickerScreen.kt +++ b/core/src/com/unciv/ui/pickerscreens/ConstructionPickerScreen.kt @@ -1,5 +1,6 @@ package com.unciv.ui.pickerscreens +import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup import com.unciv.logic.city.CityInfo @@ -18,6 +19,7 @@ class ConstructionPickerScreen(val city: CityInfo) : PickerScreen() { pick(rightSideButtonText) descriptionLabel.setText(description) } + if(production==city.cityConstructions.currentConstruction) productionTextButton.color= Color.GREEN return productionTextButton } @@ -56,7 +58,7 @@ class ConstructionPickerScreen(val city: CityInfo) : PickerScreen() { regularBuildings.addActor(productionTextButton) } - for (unit in GameBasics.Units.values.filter { it.isBuildable(cityConstructions) }) { + for (unit in GameBasics.Units.values.filter { it.isBuildable(cityConstructions) || it.name==cityConstructions.currentConstruction}) { units.addActor(getProductionButton(unit.name, unit.name + "\r\n" + cityConstructions.turnsToConstruction(unit.name) + " turns", unit.getDescription(true), "Train " + unit.name))