adjust gadget bar
This commit is contained in:
parent
fd3e195f69
commit
51334af8c3
|
@ -1,7 +1,6 @@
|
||||||
.Controls {
|
.Controls {
|
||||||
display: flex;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
flex-grow: 1;
|
gap: calc(4 * var(--padding-normal));
|
||||||
}
|
}
|
||||||
|
|
||||||
.Controls-Container {
|
.Controls-Container {
|
||||||
|
@ -27,4 +26,5 @@ kbd {
|
||||||
|
|
||||||
kbd.space {
|
kbd.space {
|
||||||
width: calc(3 * var(--kbd-key-size) + 2 * var(--padding-normal));
|
width: calc(3 * var(--kbd-key-size) + 2 * var(--padding-normal));
|
||||||
|
margin-top: calc(var(--kbd-key-size) + var(--padding-normal));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import './Controls.css';
|
import './Controls.css';
|
||||||
import useWebSocket, {ReadyState} from 'react-use-websocket';
|
import useWebSocket, {ReadyState} from 'react-use-websocket';
|
||||||
import {useEffect} from 'react';
|
import {useEffect} from 'react';
|
||||||
import Column from "./components/Column.tsx";
|
|
||||||
|
|
||||||
export default function Controls({playerId, logout}: {
|
export default function Controls({playerId, logout}: {
|
||||||
playerId: string,
|
playerId: string,
|
||||||
|
@ -62,7 +61,7 @@ export default function Controls({playerId, logout}: {
|
||||||
};
|
};
|
||||||
}, [readyState]);
|
}, [readyState]);
|
||||||
|
|
||||||
return <Column className="Controls">
|
return <div className="Controls flex-row">
|
||||||
<div className='flex-column Controls-Container'>
|
<div className='flex-column Controls-Container'>
|
||||||
<h3>Move</h3>
|
<h3>Move</h3>
|
||||||
<kbd>▲</kbd>
|
<kbd>▲</kbd>
|
||||||
|
@ -77,5 +76,5 @@ export default function Controls({playerId, logout}: {
|
||||||
<h3>Fire</h3>
|
<h3>Fire</h3>
|
||||||
<kbd className="space">Space</kbd>
|
<kbd className="space">Space</kbd>
|
||||||
</div>
|
</div>
|
||||||
</Column>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ export default function PlayerInfo({playerId, logout}: {
|
||||||
return () => clearInterval(timer);
|
return () => clearInterval(timer);
|
||||||
}, [playerId]);
|
}, [playerId]);
|
||||||
|
|
||||||
return <Column className='PlayerInfo flex-grow'>
|
return <Column className='PlayerInfo'>
|
||||||
<h3>
|
<h3>
|
||||||
{player ? `Playing as ${player?.name}` : 'loading...'}
|
{player ? `Playing as ${player?.name}` : 'loading...'}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
|
@ -23,7 +23,6 @@ export default function Scoreboard({}: {}) {
|
||||||
|
|
||||||
return <DataTable
|
return <DataTable
|
||||||
data={players}
|
data={players}
|
||||||
className='flex-grow'
|
|
||||||
columns={[
|
columns={[
|
||||||
{field: 'name'},
|
{field: 'name'},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue