summaryrefslogtreecommitdiff
path: root/sw-ui
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@gmail.com>2023-04-30 03:02:13 +0200
committerJoffrey Bion <joffrey.bion@gmail.com>2023-04-30 03:02:24 +0200
commit1c6927f6118d12a06ebea7251b266a923743d580 (patch)
tree05e8a5b3e4054bb8468b585237b0257fb39d213d /sw-ui
parentFix discard action (empty transactions popup) (diff)
downloadseven-wonders-1c6927f6118d12a06ebea7251b266a923743d580.tar.gz
seven-wonders-1c6927f6118d12a06ebea7251b266a923743d580.tar.bz2
seven-wonders-1c6927f6118d12a06ebea7251b266a923743d580.zip
Fix hand rotation indicator's placement (out of view)
Diffstat (limited to 'sw-ui')
-rw-r--r--sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/HandRotationIndicator.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/HandRotationIndicator.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/HandRotationIndicator.kt
index 9e6874d3..5d69628c 100644
--- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/HandRotationIndicator.kt
+++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/HandRotationIndicator.kt
@@ -17,14 +17,17 @@ fun ChildrenBuilder.handRotationIndicator(direction: HandRotationDirection) {
display = Display.flex
alignItems = AlignItems.center
bottom = 25.vh
+ val sideDistance = 2.rem
+ when (direction) {
+ HandRotationDirection.LEFT -> left = sideDistance
+ HandRotationDirection.RIGHT -> right = sideDistance
+ }
}
title = "Your hand will be passed to the player on your $direction after playing this card."
- val sideDistance = 2.rem
when (direction) {
HandRotationDirection.LEFT -> {
- css { left = sideDistance }
BpIcon {
icon = IconNames.ARROW_LEFT
size = 25
@@ -32,7 +35,6 @@ fun ChildrenBuilder.handRotationIndicator(direction: HandRotationDirection) {
handCardsImg()
}
HandRotationDirection.RIGHT -> {
- css { right = sideDistance }
handCardsImg()
BpIcon {
icon = IconNames.ARROW_RIGHT
bgstack15