diff options
author | Titouan BION <titouan.bion@gmail.com> | 2021-02-20 23:23:11 +0100 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@gmail.com> | 2021-02-21 12:06:56 +0100 |
commit | 38c8e1e39b29bee971fd0dcfd9ff3aa314bc2105 (patch) | |
tree | f28ab97dd83744f5d4b759021570d37b1dc1e194 /sw-ui/src/main/kotlin/org/luxons | |
parent | Replace ProductionBar by self BoardSummary (diff) | |
download | seven-wonders-38c8e1e39b29bee971fd0dcfd9ff3aa314bc2105.tar.gz seven-wonders-38c8e1e39b29bee971fd0dcfd9ff3aa314bc2105.tar.bz2 seven-wonders-38c8e1e39b29bee971fd0dcfd9ff3aa314bc2105.zip |
Display military points on the left side of the wonder instead of over it
Resolves #65
Diffstat (limited to 'sw-ui/src/main/kotlin/org/luxons')
-rw-r--r-- | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt index 734099f1..c11928ea 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt @@ -126,20 +126,24 @@ private fun RBuilder.wonderComponent(wonder: ApiWonder, military: Military) { this.alt = "Wonder ${wonder.name}" } } - victoryPoints(military.victoryPoints) { + styledDiv { css { position = Position.absolute - top = 25.pct // below the wonder name - left = 60.pct - zIndex = 2 // go above the wonder, but below the table cards + top = 20.pct + right = (-80).px + display = Display.flex + flexDirection = FlexDirection.column + alignItems = Align.start } - } - defeatTokenCount(military.nbDefeatTokens) { - css { - position = Position.absolute - top = 25.pct // below the wonder name - left = 80.pct - zIndex = 2 // go above the wonder, but below the table cards + victoryPoints(military.victoryPoints) { + css { + marginBottom = 5.px + } + } + defeatTokenCount(military.nbDefeatTokens) { + css { + marginTop = 5.px + } } } wonder.stages.forEachIndexed { index, stage -> |