diff --git a/src/assets/cards.css b/src/assets/cards.css index bbed0fd..6c64e8e 100644 --- a/src/assets/cards.css +++ b/src/assets/cards.css @@ -37,8 +37,8 @@ .playingCards .card { display: inline-block; - width: 3.3em; - height: 4.6em; + width: 2.5em; + height: 3.5em; border: 1px solid #666; border-radius: .3em; -moz-border-radius: .3em; @@ -47,7 +47,7 @@ padding: .25em; margin: 0 .5em .5em 0; text-align: center; - font-size: 1.2em; /* @change: adjust this value to make bigger or smaller cards */ + font-size: 1.5em; /* @change: adjust this value to make bigger or smaller cards */ font-weight: normal; font-family: Arial, sans-serif; position: relative; @@ -65,6 +65,21 @@ cursor: pointer; } +/* override orignal hover style */ +.playingCards.selectable a.card:hover { + bottom: 0; +} + +.playingCards.selectable a.card:active::after { + background-color: rgba(23, 146, 210, 0.5); + content: ''; + position: absolute; + left: 0; + top: 0; + width: 3em; + height: 4em; +} + /* selected and hover state */ .playingCards a.card:hover, .playingCards a.card:active, .playingCards a.card.selected, .playingCards label.card:hover, diff --git a/src/assets/doudizhu.scss b/src/assets/doudizhu.scss index f20b1e2..296d816 100644 --- a/src/assets/doudizhu.scss +++ b/src/assets/doudizhu.scss @@ -26,6 +26,11 @@ transition: visibility 0.1s, opacity 0.05s; opacity: 0; } + + .main-player-action-wrapper { + display: flex; + align-items: center; + } .timer { visibility: visible; @@ -35,7 +40,7 @@ height: 60px; .timer-text { color: #303133; - margin-top: 5px; + transform: translateY(5px); font-size: 23px; font-weight: bold; text-shadow: 0 2px 2px #909399; diff --git a/src/components/GameBoard/DoudizhuGameBoard.js b/src/components/GameBoard/DoudizhuGameBoard.js index 0cc68f0..7b536db 100644 --- a/src/components/GameBoard/DoudizhuGameBoard.js +++ b/src/components/GameBoard/DoudizhuGameBoard.js @@ -6,6 +6,7 @@ import Landlord_wName from '../../assets/images/Portrait/Landlord_wName.png'; import Peasant_wName from '../../assets/images/Portrait/Peasant_wName.png'; import PlaceHolderPlayer from '../../assets/images/Portrait/Player.png'; +import Button from "@material-ui/core/Button"; import Chip from '@material-ui/core/Chip'; import Avatar from '@material-ui/core/Avatar'; @@ -132,12 +133,25 @@ class DoudizhuGameBoard extends React.Component { else if(this.props.toggleFade === "fade-in" && (playerIdx+1)%3 === this.props.currentPlayer) fadeClassName = "scale-fade-in"; if(this.props.currentPlayer === playerIdx){ - return ( -