mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-11 00:08:58 +07:00
Allow selection of non-buildable items (#2126)
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user