From 528392baab32714b49fd31f2cf97186a97598da8 Mon Sep 17 00:00:00 2001 From: Jack Rainy Date: Thu, 12 Mar 2020 08:34:44 +0200 Subject: [PATCH] Allow selection of non-buildable items (#2126) --- .../com/unciv/ui/cityscreen/ConstructionsTable.kt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt b/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt index 21abe14671..54a5b33245 100644 --- a/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt +++ b/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt @@ -213,19 +213,18 @@ class ConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBaseScre pickProductionButton.add(buttonText.toLabel()).expandX().fillX().left() // no rejection reason means we can build it! - if(rejectionReason == "") { - pickProductionButton.onClick { - cityScreen.selectedConstruction = cityScreen.city.cityConstructions.getConstruction(construction) - cityScreen.selectedTile = null - selectedQueueEntry = -2 - cityScreen.update() - } - } else { + if(rejectionReason != "") { pickProductionButton.color = Color.GRAY pickProductionButton.row() pickProductionButton.add(rejectionReason.toLabel(Color.RED).apply{ setWrap(true)} ) .colspan(pickProductionButton.columns).fillX().left().padTop(2f) } + pickProductionButton.onClick { + cityScreen.selectedConstruction = cityScreen.city.cityConstructions.getConstruction(construction) + cityScreen.selectedTile = null + selectedQueueEntry = -2 + cityScreen.update() + } return pickProductionButton }