summaryrefslogtreecommitdiff
path: root/sw-ui
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@gmail.com>2021-02-23 18:54:11 +0100
committerJoffrey Bion <joffrey.bion@gmail.com>2021-02-23 18:54:11 +0100
commit409f21b03d4e38571a6587b0695bbc6461d791d0 (patch)
treed87fced151d285f9711ac93c382c004277a4bbb3 /sw-ui
parentAdd comment for public element that shouldn't be (diff)
downloadseven-wonders-409f21b03d4e38571a6587b0695bbc6461d791d0.tar.gz
seven-wonders-409f21b03d4e38571a6587b0695bbc6461d791d0.tar.bz2
seven-wonders-409f21b03d4e38571a6587b0695bbc6461d791d0.zip
Add highlight for built wonder levels
Resolves: https://github.com/joffrey-bion/seven-wonders/issues/111
Diffstat (limited to 'sw-ui')
-rw-r--r--sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt3
1 files changed, 2 insertions, 1 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 c11928ea..085e43ed 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
@@ -183,7 +183,8 @@ private fun RBuilder.boardToken(tokenName: String, count: Int, block: StyledDOMB
private fun RBuilder.wonderStageElement(stage: ApiWonderStage, block: StyledDOMBuilder<HTMLTag>.() -> Unit) {
val back = stage.cardBack
if (back != null) {
- cardBackImage(back) {
+ val highlightColor = if (stage.builtDuringLastMove) Color.gold else null
+ cardBackImage(cardBack = back, highlightColor = highlightColor) {
block()
}
} else {
bgstack15