From 16e0dc519037de87f7cb09f7e944d8175c9c76df Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Tue, 2 Jun 2020 00:29:34 +0200 Subject: Extract board summaries function --- .../sevenwonders/ui/components/game/GameScene.kt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'sw-ui/src/main/kotlin') diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt index 2bf98009..afc3b157 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt @@ -3,6 +3,7 @@ package org.luxons.sevenwonders.ui.components.game import com.palantir.blueprintjs.* import kotlinx.css.* import kotlinx.css.properties.* +import kotlinx.html.DIV import org.luxons.sevenwonders.model.* import org.luxons.sevenwonders.model.api.PlayerDTO import org.luxons.sevenwonders.model.boards.Board @@ -11,7 +12,7 @@ import org.luxons.sevenwonders.model.cards.HandCard import org.luxons.sevenwonders.ui.components.GlobalStyles import org.luxons.sevenwonders.ui.redux.* import react.* -import react.dom.* +import styled.StyledDOMBuilder import styled.css import styled.getClassName import styled.styledDiv @@ -71,11 +72,7 @@ private class GameScene(props: GameSceneProps) : RComponent.boardSummaries(leftBoard: Board, rightBoard: Board, topBoards: List) { + // TODO use blueprint popover with full board preview + leftPlayerBoardSummary(leftBoard) + rightPlayerBoardSummary(rightBoard) + if (topBoards.isNotEmpty()) { + topPlayerBoardsSummaries(topBoards) + } + } + private fun RBuilder.leftPlayerBoardSummary(board: Board) { boardSummary(props.players[board.playerIndex], board, BoardSummarySide.LEFT) { css { -- cgit