summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTitouan BION <titouan.bion@gmail.com>2021-02-20 23:23:11 +0100
committerJoffrey Bion <joffrey.bion@gmail.com>2021-02-21 12:06:56 +0100
commit38c8e1e39b29bee971fd0dcfd9ff3aa314bc2105 (patch)
treef28ab97dd83744f5d4b759021570d37b1dc1e194
parentReplace ProductionBar by self BoardSummary (diff)
downloadseven-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
-rw-r--r--sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt26
-rw-r--r--sw-ui/src/main/resources/images/tokens/military/defeat1.pngbin5925 -> 3215 bytes
2 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 ->
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
--- a/sw-ui/src/main/resources/images/tokens/military/defeat1.png
+++ b/sw-ui/src/main/resources/images/tokens/military/defeat1.png
Binary files differ
bgstack15