CivilopediaScreen

class CivilopediaScreen(ruleset: Ruleset, previousScreen: BaseScreen, category: CivilopediaCategories, link: String) : BaseScreen

Screen displaying the Civilopedia

Parameters

ruleset

Ruleset to display items from

category

CivilopediaCategories key to select category

link

alternate selector to select category and/or entry. Can have the form category/entry overriding the category parameter, or just entry to complement it.

Constructors

CivilopediaScreen
Link copied to clipboard
fun CivilopediaScreen(ruleset: Ruleset, previousScreen: BaseScreen, category: CivilopediaCategories = CivilopediaCategories.Tutorial, link: String = "")

Types

CategoryButtonInfo
Link copied to clipboard
private class CategoryButtonInfo(button: Button, x: Float, width: Float)
CivilopediaEntry
Link copied to clipboard
private class CivilopediaEntry(name: String, image: Actor?, flavour: ICivilopediaText?, y: Float, height: Float, sortBy: Int)

Container collecting data per Civilopedia entry

Functions

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
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
navigateCategories
Link copied to clipboard
private fun navigateCategories(key: KeyCharAndCode)
navigateEntries
Link copied to clipboard
private fun navigateEntries(direction: Int)
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()
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()
selectCategory
Link copied to clipboard
private fun selectCategory(category: CivilopediaCategories)

Select a specified category - unselects entry, rebuilds left side buttons.

private fun selectCategory(name: String)

Select a specified category

selectEntry
Link copied to clipboard
private fun selectEntry(entry: CivilopediaScreen.CivilopediaEntry)
fun selectEntry(name: String, noScrollAnimation: Boolean = false)

Select a specified entry within the current category. Unknown strings are ignored!

selectLink
Link copied to clipboard
private fun selectLink(link: String)

Jump to a "link" selecting both category and entry

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

Properties

buttonTableScroll
Link copied to clipboard
private val buttonTableScroll: AutoScrollPane
categoryToButtons
Link copied to clipboard
categoryToEntries
Link copied to clipboard
currentCategory
Link copied to clipboard
private var currentCategory: CivilopediaCategories
currentEntry
Link copied to clipboard
private var currentEntry: String
currentEntryPerCategory
Link copied to clipboard
private val currentEntryPerCategory: HashMap<CivilopediaCategories, String>
entryIndex
Link copied to clipboard
private val entryIndex: LinkedHashMap<String, CivilopediaScreen.CivilopediaEntry>
entrySelectScroll
Link copied to clipboard
private val entrySelectScroll: AutoScrollPane
entrySelectTable
Link copied to clipboard
private val entrySelectTable: Table
flavourTable
Link copied to clipboard
private val flavourTable: Table
game
Link copied to clipboard
val game: UncivGame
keyPressDispatcher
Link copied to clipboard
val keyPressDispatcher: KeyPressDispatcher
previousScreen
Link copied to clipboard
val previousScreen: BaseScreen
ruleset
Link copied to clipboard
val ruleset: Ruleset
stage
Link copied to clipboard
val stage: Stage
tutorialController
Link copied to clipboard
protected val tutorialController: TutorialController

Sources

jvm source
Link copied to clipboard