TechPickerScreen

class TechPickerScreen(civInfo: CivilizationInfo, centerOnTech: Technology?, freeTechPick: Boolean) : PickerScreen

Functions

addConnectingLines
Link copied to clipboard
private fun addConnectingLines()
centerOnTechnology
Link copied to clipboard
private fun centerOnTechnology(tech: Technology)
createTechTable
Link copied to clipboard
private fun createTechTable()
displayTutorial
Link copied to clipboard
fun displayTutorial(tutorial: Tutorial, test: () -> Boolean? = null)
dispose
Link copied to clipboard
open override fun dispose()
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getTechProgressLabel
Link copied to clipboard
private fun getTechProgressLabel(techs: List<String>): String
hashCode
Link copied to clipboard
open fun hashCode(): Int
hide
Link copied to clipboard
open override fun hide()
isCrampedPortrait
Link copied to clipboard
fun isCrampedPortrait(): Boolean
isNarrowerThan4to3
Link copied to clipboard
fun isNarrowerThan4to3(): Boolean
isPortrait
Link copied to clipboard
fun isPortrait(): Boolean
onBackButtonClicked
Link copied to clipboard
fun onBackButtonClicked(action: () -> Unit)
openOptionsPopup
Link copied to clipboard
fun openOptionsPopup()
pause
Link copied to clipboard
open override fun pause()
pick
Link copied to clipboard
protected fun pick(rightButtonText: String)

Sets the text of the rightSideButton and enables it if it's the player's turn

removeRightSideClickListeners
Link copied to clipboard
fun removeRightSideClickListeners()

Remove listeners from rightSideButton to prepare giving it a new onClick

render
Link copied to clipboard
open override fun render(delta: Float)
resize
Link copied to clipboard
open override fun resize(width: Int, height: Int)
resume
Link copied to clipboard
open override fun resume()
selectTechnology
Link copied to clipboard
private fun selectTechnology(tech: Technology?, center: Boolean = false, switchFromWorldScreen: Boolean = true)
selectTechnologyForFreeTech
Link copied to clipboard
private fun selectTechnologyForFreeTech(tech: Technology)
setButtonsInfo
Link copied to clipboard
private fun setButtonsInfo()
setDefaultCloseAction
Link copied to clipboard
fun setDefaultCloseAction(previousScreen: BaseScreen? = null)

Initializes the Close button's action (and the Back/ESC handler) to return to the previousScreen if specified, or else to the world screen.

setRightSideButtonEnabled
Link copied to clipboard
fun setRightSideButtonEnabled(enabled: Boolean)

Enables the rightSideButton. See pick for a way to set the text.

show
Link copied to clipboard
open override fun show()
toString
Link copied to clipboard
open fun toString(): String

Properties

bottomTable
Link copied to clipboard
protected var bottomTable: Table
civInfo
Link copied to clipboard
internal val civInfo: CivilizationInfo
civTech
Link copied to clipboard
private var civTech: TechManager
closeButton
Link copied to clipboard
protected var closeButton: TextButton

The close button on the lower left of bottomTable, see setDefaultCloseAction

currentTechColor
Link copied to clipboard
private val currentTechColor: Color
descriptionLabel
Link copied to clipboard
protected var descriptionLabel: Label

A scrollable wrapped Label you can use to show descriptions in the bottomTable, starts empty

freeTechPick
Link copied to clipboard
private val freeTechPick: Boolean = false
game
Link copied to clipboard
val game: UncivGame
keyPressDispatcher
Link copied to clipboard
val keyPressDispatcher: KeyPressDispatcher
lines
Link copied to clipboard
private var lines: ArrayList<Image>
maxBottomTableHeight
Link copied to clipboard
private val maxBottomTableHeight: Float = 150f
queuedTechColor
Link copied to clipboard
private val queuedTechColor: Color
researchableTechColor
Link copied to clipboard
private val researchableTechColor: Color
researchableTechs
Link copied to clipboard
private var researchableTechs: HashSet<String>
researchedTechColor
Link copied to clipboard
private val researchedTechColor: Color
rightSideButton
Link copied to clipboard
protected var rightSideButton: TextButton

A button on the lower right of bottomTable you can use for a "OK"-type action, starts disabled

rightSideGroup
Link copied to clipboard
protected var rightSideGroup: VerticalGroup

A wrapper containing rightSideButton. You can add buttons, they will be arranged vertically

screenSplit
Link copied to clipboard
private val screenSplit: Float = 0.85f
scrollPane
Link copied to clipboard
protected var scrollPane: AutoScrollPane

A ScrollPane scrolling topTable, disabled by the disableScroll parameter

selectedTech
Link copied to clipboard
private var selectedTech: Technology? = null
splitPane
Link copied to clipboard
protected var splitPane: SplitPane

A fixed SplitPane holds scrollPane and bottomTable

stage
Link copied to clipboard
val stage: Stage
techNameToButton
Link copied to clipboard
private var techNameToButton: HashMap<String, TechButton>
techTable
Link copied to clipboard
private val techTable: Table

We need this to be a separate table, and NOT the topTable, because inhales When call setConnectingLines we need to pack() the table so that the lines will align correctly, BUT this causes the table to be SMALLER THAN THE SCREEN for small tech trees from mods, meaning the tech tree is in a crumpled heap at the lower-left corner of the screen Having this be a separate table allows us to leave the TopTable as is (that is: auto-width to fit the scrollPane) leaving us the juicy small tech tree right in the center.

tempTechsToResearch
Link copied to clipboard
private var tempTechsToResearch: ArrayList<String>
topTable
Link copied to clipboard
protected var topTable: Table

The table displaying the choices from which to pick (usually). Also the element which most of the screen real estate is devoted to displaying.

turnsToTech
Link copied to clipboard
private val turnsToTech: Map<String, String>
tutorialController
Link copied to clipboard
protected val tutorialController: TutorialController

Sources

jvm source
Link copied to clipboard