CityConstructionsTable
Manager to hold and coordinate two widgets for the city screen left side:
Construction queue with switch to ConstructionInfoTable button and the enqueue / buy buttons. The queue is scrollable, limited to one third of the stage height.
Available constructions display, scrolling, grouped with expanders and therefore of dynamic height.
Constructors
CityConstructionsTable
Link copied to clipboard
Types
ConstructionButtonDTO
Link copied to clipboard
private class ConstructionButtonDTO(construction: IConstruction, buttonText: String, rejectionReason: String?)
Content copied to clipboard
Functions
addActorsToStage
Link copied to clipboard
fun addActorsToStage()
Content copied to clipboard
addCategory
Link copied to clipboard
addConstructionToQueue
Link copied to clipboard
private fun addConstructionToQueue(construction: IConstruction, cityConstructions: CityConstructions)
Content copied to clipboard
askToBuyConstruction
Link copied to clipboard
fun askToBuyConstruction(construction: INonPerpetualConstruction, stat: Stat = preferredBuyStat)
Content copied to clipboard
Ask whether user wants to buy construction for stat.
cannotAddConstructionToQueue
Link copied to clipboard
private fun cannotAddConstructionToQueue(construction: IConstruction, city: CityInfo, cityConstructions: CityConstructions): Boolean
Content copied to clipboard
getBuyButton
Link copied to clipboard
private fun getBuyButton(construction: INonPerpetualConstruction?, stat: Stat = Stat.Gold): TextButton?
Content copied to clipboard
getBuyButtons
Link copied to clipboard
private fun getBuyButtons(construction: INonPerpetualConstruction?): List<TextButton>
Content copied to clipboard
getConstructionButton
Link copied to clipboard
private fun getConstructionButton(constructionButtonDTO: CityConstructionsTable.ConstructionButtonDTO): Table
Content copied to clipboard
getConstructionButtonDTOs
Link copied to clipboard
private fun getConstructionButtonDTOs(): ArrayList<CityConstructionsTable.ConstructionButtonDTO>
Content copied to clipboard
getConstructionSound
Link copied to clipboard
private fun getConstructionSound(construction: IConstruction): UncivSound
Content copied to clipboard
getLowerPriorityButton
Link copied to clipboard
private fun getLowerPriorityButton(constructionQueueIndex: Int, name: String, city: CityInfo): Table
Content copied to clipboard
getLowerWidth
Link copied to clipboard
Forces layout calculation and returns the lower Table's (available constructions) width
getProgressBar
Link copied to clipboard
getQueueButton
Link copied to clipboard
getQueueEntry
Link copied to clipboard
private fun getQueueEntry(constructionQueueIndex: Int, constructionName: String): Table
Content copied to clipboard
getRaisePriorityButton
Link copied to clipboard
private fun getRaisePriorityButton(constructionQueueIndex: Int, name: String, city: CityInfo): Table
Content copied to clipboard
getRemoveFromQueueButton
Link copied to clipboard
private fun getRemoveFromQueueButton(constructionQueueIndex: Int, city: CityInfo): Table
Content copied to clipboard
getUpperWidth
Link copied to clipboard
Forces layout calculation and returns the upper Table's (construction queue) width
isConstructionPurchaseAllowed
Link copied to clipboard
private fun isConstructionPurchaseAllowed(construction: INonPerpetualConstruction, stat: Stat, constructionBuyCost: Int): Boolean
Content copied to clipboard
This tests whether the buy button should be enabled
isConstructionPurchaseShown
Link copied to clipboard
private fun isConstructionPurchaseShown(construction: INonPerpetualConstruction, stat: Stat): Boolean
Content copied to clipboard
This tests whether the buy button should be shown
isSelectedQueueEntry
Link copied to clipboard
purchaseConstruction
Link copied to clipboard
private fun purchaseConstruction(construction: INonPerpetualConstruction, stat: Stat = Stat.Gold)
Content copied to clipboard
resizeAvailableConstructionsScrollPane
Link copied to clipboard
private fun resizeAvailableConstructionsScrollPane()
Content copied to clipboard
update
Link copied to clipboard
updateAvailableConstructions
Link copied to clipboard
private fun updateAvailableConstructions()
Content copied to clipboard
updateButtons
Link copied to clipboard
updateConstructionQueue
Link copied to clipboard
private fun updateConstructionQueue()
Content copied to clipboard
Properties
availableConstructionsScrollPane
Link copied to clipboard
availableConstructionsTable
Link copied to clipboard
buyButtonsTable
Link copied to clipboard
cityScreen
Link copied to clipboard
constructionsQueueScrollPane
Link copied to clipboard
constructionsQueueTable
Link copied to clipboard
improvementBuildingToConstruct
Link copied to clipboard
isVisible
Link copied to clipboard
lowerTable
Link copied to clipboard
lowerTableScrollCell
Link copied to clipboard
posFromEdge
Link copied to clipboard
preferredBuyStat
Link copied to clipboard
selectedQueueEntry
Link copied to clipboard
showCityInfoTableButton
Link copied to clipboard
stageHeight
Link copied to clipboard
upperTable
Link copied to clipboard
Sources
jvm source
Link copied to clipboard