Add options to the lobby screen
This commit is contained in:
parent
9a43b1c17f
commit
9105639bd9
1 changed files with 73 additions and 4 deletions
|
|
@ -1,10 +1,23 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import OptionInfo from "../../components/modals/OptionInfo.svelte";
|
||||||
|
import SciFiCheckbox from "../../components/SciFi-Checkbox.svelte";
|
||||||
import SciFiButton from "../../components/SciFi-Button.svelte";
|
import SciFiButton from "../../components/SciFi-Button.svelte";
|
||||||
import Player from "../../components/Player.svelte";
|
import Player from "../../components/Player.svelte";
|
||||||
|
|
||||||
function tempButtonHandler() {};
|
function tempButtonHandler() {};
|
||||||
|
|
||||||
|
let optionsModal = false;
|
||||||
|
function toggleOptionsModal() {
|
||||||
|
console.log(`Toggling options modal`)
|
||||||
|
optionsModal = !optionsModal;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<OptionInfo
|
||||||
|
open="{optionsModal}"
|
||||||
|
on:close="{toggleOptionsModal}"
|
||||||
|
/>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<div>
|
<div>
|
||||||
<h1>Gravwell</h1>
|
<h1>Gravwell</h1>
|
||||||
|
|
@ -12,13 +25,14 @@ function tempButtonHandler() {};
|
||||||
<h2>Players</h2>
|
<h2>Players</h2>
|
||||||
<div class="player-box">
|
<div class="player-box">
|
||||||
<Player
|
<Player
|
||||||
name="Lorem Ipsupotas"
|
name="Player 1"
|
||||||
colour="#00aa00"
|
colour="#00aa00"
|
||||||
/>
|
/>
|
||||||
<Player
|
<Player
|
||||||
name="Player 2"
|
name="Player 2"
|
||||||
colour="#aaaa00"
|
colour="#aaaa00"
|
||||||
/>
|
/>
|
||||||
|
<div class="divider"></div>
|
||||||
<Player
|
<Player
|
||||||
name="Player 3"
|
name="Player 3"
|
||||||
colour="#00aaaa"
|
colour="#00aaaa"
|
||||||
|
|
@ -30,15 +44,54 @@ function tempButtonHandler() {};
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sci-fi-box">
|
<div class="sci-fi-box">
|
||||||
|
<div class="info-button-container">
|
||||||
|
<SciFiButton
|
||||||
|
handler={toggleOptionsModal}
|
||||||
|
height="60px"
|
||||||
|
width="60px"
|
||||||
|
>
|
||||||
|
<div style="display: flex; align-items: center; justify-content: center;">
|
||||||
|
<span class="material-icons">help_outline</span>
|
||||||
|
</div>
|
||||||
|
</SciFiButton>
|
||||||
|
</div>
|
||||||
<h2>Options</h2>
|
<h2>Options</h2>
|
||||||
|
<div class="options-box">
|
||||||
|
<SciFiCheckbox
|
||||||
|
name="No Secrets"
|
||||||
|
id="no-secrets"
|
||||||
|
>
|
||||||
|
No Secrets
|
||||||
|
</SciFiCheckbox>
|
||||||
|
<SciFiCheckbox
|
||||||
|
name="Hardcore Mode"
|
||||||
|
id="hardcore"
|
||||||
|
>
|
||||||
|
Hardcore Mode
|
||||||
|
</SciFiCheckbox>
|
||||||
|
<SciFiCheckbox
|
||||||
|
name="Warp Gate Activated"
|
||||||
|
id="warp-gate"
|
||||||
|
>
|
||||||
|
Warp Gate Activated!
|
||||||
|
</SciFiCheckbox>
|
||||||
|
<SciFiCheckbox
|
||||||
|
name="Chaos Theory"
|
||||||
|
id="chaos-theory"
|
||||||
|
>
|
||||||
|
Chaos Theory
|
||||||
|
</SciFiCheckbox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-row">
|
<div class="flex-row">
|
||||||
<SciFiButton
|
<SciFiButton
|
||||||
|
title="Starts the game"
|
||||||
handler={tempButtonHandler}
|
handler={tempButtonHandler}
|
||||||
>
|
>
|
||||||
Start Game
|
Start Game
|
||||||
</SciFiButton>
|
</SciFiButton>
|
||||||
<SciFiButton
|
<SciFiButton
|
||||||
|
title="Delete the lobby, preventing further games from being played"
|
||||||
background="#ff0000"
|
background="#ff0000"
|
||||||
handler={tempButtonHandler}
|
handler={tempButtonHandler}
|
||||||
>
|
>
|
||||||
|
|
@ -55,7 +108,6 @@ main {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,8 +115,6 @@ h1 {
|
||||||
font-size: 4rem;
|
font-size: 4rem;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
line-height: 1.1;
|
line-height: 1.1;
|
||||||
margin: 2rem auto;
|
|
||||||
max-width: 14rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -75,6 +125,7 @@ h1 {
|
||||||
border-color: white;
|
border-color: white;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
background: rgba(0, 0, 0, 0.5);
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
position: relative;
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
|
@ -87,11 +138,29 @@ h1 {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
|
> .divider {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
> :global(div) {
|
> :global(div) {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.options-box {
|
||||||
|
padding-bottom: 5px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-button-container {
|
||||||
|
position: absolute;
|
||||||
|
top: -2px;
|
||||||
|
right: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
.flex-row {
|
.flex-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue