From b1e5a54876e19b4abde12d452cd35665b7ea78c4 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sat, 4 Apr 2020 19:52:52 +0200 Subject: Refactoring in GameScene.kt --- .../sevenwonders/ui/components/game/GameScene.kt | 56 ++++++++++++---------- 1 file changed, 30 insertions(+), 26 deletions(-) (limited to 'sw-ui-kt/src') diff --git a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt index 2551b43c..d54a0240 100644 --- a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt +++ b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt @@ -74,10 +74,16 @@ private class GameScene(props: GameSceneProps) : RComponent.() -> Unit = {}): ReactElement { + private fun RBuilder.sayReadyButton(): ReactElement { val isReady = props.playerIsReady val intent = if (isReady) Intent.SUCCESS else Intent.PRIMARY return styledDiv { + css { + position = Position.absolute + bottom = 6.rem + left = 50.pct + transform { translate(tx = (-50).pct) } + } bpButtonGroup { bpButton( large = true, @@ -88,6 +94,7 @@ private class GameScene(props: GameSceneProps) : RComponent