mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-10 15:59:33 +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()
|
pickProductionButton.add(buttonText.toLabel()).expandX().fillX().left()
|
||||||
|
|
||||||
// no rejection reason means we can build it!
|
// no rejection reason means we can build it!
|
||||||
if(rejectionReason == "") {
|
if(rejectionReason != "") {
|
||||||
pickProductionButton.onClick {
|
|
||||||
cityScreen.selectedConstruction = cityScreen.city.cityConstructions.getConstruction(construction)
|
|
||||||
cityScreen.selectedTile = null
|
|
||||||
selectedQueueEntry = -2
|
|
||||||
cityScreen.update()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
pickProductionButton.color = Color.GRAY
|
pickProductionButton.color = Color.GRAY
|
||||||
pickProductionButton.row()
|
pickProductionButton.row()
|
||||||
pickProductionButton.add(rejectionReason.toLabel(Color.RED).apply{ setWrap(true)} )
|
pickProductionButton.add(rejectionReason.toLabel(Color.RED).apply{ setWrap(true)} )
|
||||||
.colspan(pickProductionButton.columns).fillX().left().padTop(2f)
|
.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
|
return pickProductionButton
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user