MultiplayerScreen

class MultiplayerScreen(previousScreen: BaseScreen) : PickerScreen

Functions

addCurrentGameButton
Link copied to clipboard
private fun addCurrentGameButton()
addMultiplayerGame
Link copied to clipboard
fun addMultiplayerGame(gameId: String?, gameName: String = "")
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
gameIsAlreadySavedAsMultiplayer
Link copied to clipboard
private fun gameIsAlreadySavedAsMultiplayer(gameId: String): 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
isUsersTurn
Link copied to clipboard
private fun isUsersTurn(gameInfo: GameInfoPreview): Boolean
joinMultiplayerGame
Link copied to clipboard
private fun joinMultiplayerGame()
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

redownloadAllGames
Link copied to clipboard
private fun redownloadAllGames()
reloadGameListUI
Link copied to clipboard
fun reloadGameListUI()
removeMultiplayerGame
Link copied to clipboard
fun removeMultiplayerGame(gameInfo: GameInfoPreview?, gameName: String)
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()
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
unselectGame
Link copied to clipboard
private fun unselectGame()

Properties

addGameButton
Link copied to clipboard
private val addGameButton: TextButton
addGameText
Link copied to clipboard
private val addGameText: String
bottomTable
Link copied to clipboard
protected var bottomTable: Table
closeButton
Link copied to clipboard
protected var closeButton: TextButton

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

copyGameIdButton
Link copied to clipboard
private val copyGameIdButton: TextButton
copyGameIdText
Link copied to clipboard
private val copyGameIdText: String
copyUserIdButton
Link copied to clipboard
private val copyUserIdButton: TextButton
copyUserIdText
Link copied to clipboard
private val copyUserIdText: String
descriptionLabel
Link copied to clipboard
protected var descriptionLabel: Label

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

editButton
Link copied to clipboard
private val editButton: TextButton
editButtonText
Link copied to clipboard
private val editButtonText: String
game
Link copied to clipboard
val game: UncivGame
keyPressDispatcher
Link copied to clipboard
val keyPressDispatcher: KeyPressDispatcher
leftSideTable
Link copied to clipboard
private val leftSideTable: Table
maxBottomTableHeight
Link copied to clipboard
private val maxBottomTableHeight: Float = 150f
multiplayerGames
Link copied to clipboard
private var multiplayerGames: ConcurrentHashMap<FileHandle, GameInfoPreview>
refreshButton
Link copied to clipboard
private val refreshButton: TextButton
refreshText
Link copied to clipboard
private val refreshText: String
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

rightSideTable
Link copied to clipboard
private val rightSideTable: Table
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

selectedGameFile
Link copied to clipboard
private lateinit var selectedGameFile: FileHandle
splitPane
Link copied to clipboard
protected var splitPane: SplitPane

A fixed SplitPane holds scrollPane and bottomTable

stage
Link copied to clipboard
val stage: Stage
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.

tutorialController
Link copied to clipboard
protected val tutorialController: TutorialController

Sources

jvm source
Link copied to clipboard