mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 12:54:06 -04:00
Allow Space Key to close PlayerReadyScreen (#10155)
This commit is contained in:
parent
5a8f18f726
commit
b6db8df484
@ -3,9 +3,11 @@ package com.unciv.ui.screens.worldscreen
|
||||
import com.badlogic.gdx.scenes.scene2d.Touchable
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||
import com.unciv.Constants
|
||||
import com.unciv.ui.screens.basescreen.BaseScreen
|
||||
import com.unciv.ui.components.input.onClick
|
||||
import com.unciv.ui.components.extensions.toLabel
|
||||
import com.unciv.ui.components.input.KeyboardBinding
|
||||
import com.unciv.ui.components.input.keyShortcuts
|
||||
import com.unciv.ui.components.input.onActivation
|
||||
import com.unciv.ui.screens.basescreen.BaseScreen
|
||||
|
||||
class PlayerReadyScreen(worldScreen: WorldScreen) : BaseScreen() {
|
||||
init {
|
||||
@ -19,9 +21,11 @@ class PlayerReadyScreen(worldScreen: WorldScreen) : BaseScreen() {
|
||||
|
||||
table.add("[$curCiv] ready?".toLabel(curCiv.nation.getInnerColor(), Constants.headingFontSize))
|
||||
|
||||
table.onClick {
|
||||
table.onActivation {
|
||||
game.replaceCurrentScreen(worldScreen)
|
||||
}
|
||||
// Doing this separately instead of passing the binding to onActivation avoids the tooltip
|
||||
table.keyShortcuts.add(KeyboardBinding.NextTurnAlternate)
|
||||
table.setFillParent(true)
|
||||
stage.addActor(table)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user