From 38c8e1e39b29bee971fd0dcfd9ff3aa314bc2105 Mon Sep 17 00:00:00 2001 From: Titouan BION Date: Sat, 20 Feb 2021 23:23:11 +0100 Subject: Display military points on the left side of the wonder instead of over it Resolves #65 --- .../sevenwonders/ui/components/game/Board.kt | 26 ++++++++++++--------- .../resources/images/tokens/military/defeat1.png | Bin 5925 -> 3215 bytes 2 files changed, 15 insertions(+), 11 deletions(-) (limited to 'sw-ui') 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 -> diff --git a/sw-ui/src/main/resources/images/tokens/military/defeat1.png b/sw-ui/src/main/resources/images/tokens/military/defeat1.png index 00a615c7..1c61bf4c 100644 Binary files a/sw-ui/src/main/resources/images/tokens/military/defeat1.png and b/sw-ui/src/main/resources/images/tokens/military/defeat1.png differ -- cgit