This commit is contained in:
Jon Eugster
2023-09-10 16:15:41 +02:00
parent 87cb299b1f
commit b01dd1de6e
6 changed files with 19 additions and 13 deletions
+5 -1
View File
@@ -335,7 +335,11 @@ export function CommandLineInterface(props: { world: string, level: number, data
// Scroll to the end of the proof if it is updated.
React.useEffect(() => {
proofPanelRef.current?.lastElementChild?.scrollIntoView() //scrollTo(0,0)
if (proof?.length > 1) {
proofPanelRef.current?.lastElementChild?.scrollIntoView() //scrollTo(0,0)
} else {
proofPanelRef.current?.scrollTo(0,0)
}
}, [proof])
// Scroll to element if selection changes
+3 -5
View File
@@ -51,15 +51,13 @@ svg .disabled {
.world-selection-menu {
padding: .5em 1em;
position: absolute;
right: 0;
right: 1em;
top: 1em;
/* margin: 1em; */
/* border: 1px solid var(--clr-primary); */
border-bottom: 1px solid var(--clr-primary);
border-left: 1px solid var(--clr-primary);
border-top: 1px solid var(--clr-primary);
border: 1px solid var(--clr-primary);
background-color: #fff;
border-radius: .5em 0 0 .5em;
border-radius: .5em;
filter: drop-shadow(4px 4px 5px rgba(0,0,0,0.5));
}
+2 -2
View File
@@ -193,7 +193,7 @@ export function WorldSelectionMenu() {
const dispatch = useAppDispatch()
function label(x : number) {
return x == 0 ? 'none' : x == 1 ? 'lax' : 'regular'
return x == 0 ? 'none' : x == 1 ? 'relaxed' : 'regular'
}
return <nav className="world-selection-menu">
@@ -201,7 +201,7 @@ export function WorldSelectionMenu() {
<span className="difficulty-label">Game Rules</span>
<Slider
orientation="vertical"
title="Game Rules:&#10;- regular: 🔐 levels, 🔐 tactics&#10;- lax: 🔓 levels, 🔐 tactics&#10;- none: 🔓 levels, 🔓 tactics"
title="Game Rules:&#10;- regular: 🔐 levels, 🔐 tactics&#10;- relaxed: 🔓 levels, 🔐 tactics&#10;- none: 🔓 levels, 🔓 tactics"
min={0} max={2}
aria-label="Game Rules"
defaultValue={difficulty}