1
0

In-play tweaks

Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
James Ketrenos 2022-02-23 22:42:24 -08:00
parent e865133cc1
commit 1e51512ee8
4 changed files with 37 additions and 25 deletions

View File

@ -155,10 +155,18 @@
} }
.Roberta .Pip-Shape { .Roberta .Pip-Shape {
top: -2em;
left: -2em;
clip-path: circle(50%);
transform: scale(0.45);
background-image:url("./assets/woman-robber.png"); background-image:url("./assets/woman-robber.png");
} }
.Robert .Pip-Shape { .Robert .Pip-Shape {
top: -2em;
left: -2em;
clip-path: circle(50%);
transform: scale(0.45);
background-image:url("./assets/man-robber.png"); background-image:url("./assets/man-robber.png");
} }

View File

@ -10,7 +10,7 @@
.BottomBar { .BottomBar {
display: flex; display: flex;
margin-right: 40vw; margin-right: 30vw;
justify-content: space-between; justify-content: space-between;
align-items: flex-end; align-items: flex-end;
} }
@ -18,13 +18,14 @@
.WaitingForPlayer { .WaitingForPlayer {
display: flex; display: flex;
position: absolute; position: absolute;
left: 0; left: 0.5em;
right: 0;/*40vw;*/ /* right: 30vw;*/
bottom: 0; /* bottom: 0;*/
top: 0; opacity: 0.8;
top: 0.5em;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: rgba(0,0,0,0.5); /*background: rgba(0,0,0,0.5);*/
z-index: 0;/*1000*/ z-index: 0;/*1000*/
} }
@ -208,7 +209,7 @@
box-sizing: border-box; box-sizing: border-box;
max-height: 100vh; max-height: 100vh;
overflow: hidden; overflow: hidden;
max-width: 40vw; max-width: 30vw;
z-index: 100; z-index: 100;
padding: 0.5em; padding: 0.5em;
right: 0px; right: 0px;
@ -315,7 +316,7 @@
.PlayerSelector .MuiTypography-body1 { .PlayerSelector .MuiTypography-body1 {
font-size: 0.8rem; font-size: 0.8rem;
white-space: nowrap; /* white-space: nowrap;*/
} }
.PlayerSelector .MuiTypography-body2 { .PlayerSelector .MuiTypography-body2 {

View File

@ -219,7 +219,7 @@ const Chat = ({ table }) => {
} }
const name = table.game ? table.game.name : "Why no game?"; const name = table.game ? table.game.name : "Why no game?";
const startTime = table.game ? table.game.startTime : Date.now();
return ( return (
<Paper className="Chat"> <Paper className="Chat">
<List className="ChatList" id="ChatList" onScroll={chatScroll}> <List className="ChatList" id="ChatList" onScroll={chatScroll}>
@ -229,7 +229,7 @@ const Chat = ({ table }) => {
disabled={!name} disabled={!name}
onChange={chatInput} onChange={chatInput}
onKeyPress={chatKeyPress} onKeyPress={chatKeyPress}
label={(<Moment format="h:mm:ss" interval={1000}/>)} variant="outlined"/> label={(<Moment format="h:mm:ss">{Date.now()-startTime}</Moment>)} variant="outlined"/>
</Paper> </Paper>
); );
} }
@ -411,9 +411,9 @@ const Action = ({ table }) => {
} }
<Button disabled={robberActions || !isTurn || !hasRolled} onClick={passClick}>Done</Button> <Button disabled={robberActions || !isTurn || !hasRolled} onClick={passClick}>Done</Button>
</> } </> }
{ !inLobby && { /* inLobby &&
<Button onClick={quitClick}>Quit</Button> <Button onClick={quitClick}>Quit</Button>
} */ }
</Paper> </Paper>
); );
} }

View File

@ -33,21 +33,24 @@ const ResourceCounter = ({type, count, onCount, max}) => {
display: 'flex', display: 'flex',
justifyContent: 'space-around', justifyContent: 'space-around',
width: '100%', width: '100%',
alignItems: 'center' alignItems: 'center',
flexDirection: 'column'
}}> }}>
<Button style={{
flexShrink: 1,
minWidth: 0
}}
disabled={count>=max}
onClick={plusClicked}>+</Button>
<div style={{userSelect: 'none'}}>{count}</div> <div style={{userSelect: 'none'}}>{count}</div>
<Button style={{ <div>
flexShrink: 1, <Button style={{
minWidth: 0 flexShrink: 1,
}} minWidth: 0
disabled={count===0} }}
onClick={minusClicked}>-</Button> disabled={count>=max}
onClick={plusClicked}>+</Button>
<Button style={{
flexShrink: 1,
minWidth: 0
}}
disabled={count===0}
onClick={minusClicked}>-</Button>
</div>
</div> </div>
</div> </div>
); );