difficulty level
This commit is contained in:
@@ -10,17 +10,22 @@
|
|||||||
margin-bottom: .2em;
|
margin-bottom: .2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.world-selection-menu .slider-wrap {
|
.world-selection-menu .slider-wrap {
|
||||||
display: inline-block;
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* min-width: 16em; */
|
/* min-width: 16em; */
|
||||||
padding-left: 3em;
|
padding-left: 0.5em;
|
||||||
padding-right: 3em;
|
padding-right: 3em;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.difficulty-label {
|
||||||
|
font-size: 0.875em;
|
||||||
|
padding-top: 4px;
|
||||||
|
padding-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
/* Test for mobile `title`s */
|
/* Test for mobile `title`s */
|
||||||
@media (pointer: coarse), (hover: none) {
|
@media (pointer: coarse), (hover: none) {
|
||||||
|
|||||||
@@ -44,11 +44,6 @@ const downloadFile = ({ data, fileName, fileType } : downloadFileParam) => {
|
|||||||
/** The menu that is shown next to the world selection graph */
|
/** The menu that is shown next to the world selection graph */
|
||||||
export function WelcomeMenu() {
|
export function WelcomeMenu() {
|
||||||
|
|
||||||
function label(x : number) {
|
|
||||||
return x == 0 ? 'Easy' : x == 1 ? 'Explorer' : 'Strict'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return <nav className="world-selection-menu">
|
return <nav className="world-selection-menu">
|
||||||
<Button inverted="false" title="back to games selection" to="/">
|
<Button inverted="false" title="back to games selection" to="/">
|
||||||
<FontAwesomeIcon icon={faArrowLeft} /> <FontAwesomeIcon icon={faGlobe} />
|
<FontAwesomeIcon icon={faArrowLeft} /> <FontAwesomeIcon icon={faGlobe} />
|
||||||
@@ -117,7 +112,7 @@ export function WorldSelectionMenu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function label(x : number) {
|
function label(x : number) {
|
||||||
return x == 0 ? 'Playground' : x == 1 ? 'Explorer' : 'Regular'
|
return x == 0 ? 'playground' : x == 1 ? 'explorer' : 'regular'
|
||||||
}
|
}
|
||||||
|
|
||||||
return <nav className="world-selection-menu">
|
return <nav className="world-selection-menu">
|
||||||
@@ -125,15 +120,16 @@ export function WorldSelectionMenu() {
|
|||||||
<Button title="Load game progress from JSON" onClick={openUploadMenu} to=""><FontAwesomeIcon icon={faUpload} /></Button>
|
<Button title="Load game progress from JSON" onClick={openUploadMenu} to=""><FontAwesomeIcon icon={faUpload} /></Button>
|
||||||
<Button title="Clear game progress" to="" onClick={openEraseMenu}><FontAwesomeIcon icon={faEraser} /></Button>
|
<Button title="Clear game progress" to="" onClick={openEraseMenu}><FontAwesomeIcon icon={faEraser} /></Button>
|
||||||
<div className="slider-wrap">
|
<div className="slider-wrap">
|
||||||
|
<span className="difficulty-label">difficulty:</span>
|
||||||
<Slider
|
<Slider
|
||||||
title="Difficulties: - regular: 🔐 levels, 🔐 tactics - explorer: 🔓 levels, 🔐 tactics - playground: 🔓 levels, 🔓 tactics"
|
title="Difficulties: - regular: 🔐 levels, 🔐 tactics - explorer: 🔓 levels, 🔐 tactics - playground: 🔓 levels, 🔓 tactics"
|
||||||
min={0} max={2}
|
min={0} max={2}
|
||||||
aria-label="Mode"
|
aria-label="Mode"
|
||||||
defaultValue={difficulty}
|
defaultValue={difficulty}
|
||||||
marks={[
|
marks={[
|
||||||
{value: 0, label: 'playground'},
|
{value: 0, label: label(0)},
|
||||||
{value: 1, label: 'explorer'},
|
{value: 1, label: label(1)},
|
||||||
{value: 2, label: 'regular'}
|
{value: 2, label: label(2)}
|
||||||
]}
|
]}
|
||||||
valueLabelFormat={label}
|
valueLabelFormat={label}
|
||||||
getAriaValueText={label}
|
getAriaValueText={label}
|
||||||
|
|||||||
Reference in New Issue
Block a user