diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-07-01 23:41:05 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-07-01 23:41:05 +0200 |
commit | a2d636d1e78d42b216e77a389cba88a8f16561c8 (patch) | |
tree | 71d2df935e7011a4e94906a0d29d5e6fab9f2e72 /sw-ui/src/main/kotlin/org | |
parent | Add setup sidebar to choose wonder sides (diff) | |
download | seven-wonders-a2d636d1e78d42b216e77a389cba88a8f16561c8.tar.gz seven-wonders-a2d636d1e78d42b216e77a389cba88a8f16561c8.tar.bz2 seven-wonders-a2d636d1e78d42b216e77a389cba88a8f16561c8.zip |
Extract papyrus background style
Diffstat (limited to 'sw-ui/src/main/kotlin/org')
-rw-r--r-- | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/GlobalStyles.kt | 5 | ||||
-rw-r--r-- | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/GlobalStyles.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/GlobalStyles.kt index 97a9fbfa..f5d76dd7 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/GlobalStyles.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/GlobalStyles.kt @@ -16,6 +16,11 @@ object GlobalStyles : StyleSheet("GlobalStyles", isStatic = true) { overflow = Overflow.hidden } + val papyrusBackground by css { + background = "url('images/backgrounds/papyrus.jpg')" + backgroundSize = "cover" + } + val fixedCenter by css { position = Position.fixed left = 50.pct diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt index b4e432df..778fe9d7 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt @@ -39,8 +39,7 @@ private class GameScene(props: GameSceneProps) : RComponent<GameSceneProps, RSta override fun RBuilder.render() { styledDiv { css { - background = "url('images/backgrounds/papyrus.jpg')" - backgroundSize = "cover" + +GlobalStyles.papyrusBackground +GlobalStyles.fullscreen } val turnInfo = props.gameState?.turnInfo |