Skip to content

Commit

Permalink
General menu improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed Oct 9, 2024
1 parent 6157caf commit b764a7e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/components/changelog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export function ChangelogModal({buildNumber, buildCommit, lastCommit}: {buildNum
<li key={i}>{v}</li>
)}
</ol>
<button onClick={() => modalRef.current?.close()}>Close</button>
</dialog>;
}, [buildNumber, buildCommit, lastCommit, latestChanges, modalRef]);

Expand All @@ -56,7 +57,7 @@ export function ChangelogModal({buildNumber, buildCommit, lastCommit}: {buildNum
}

return <>
<p>Build number {buildNumber ?? buildCommit} {newChangesButton}</p>
<p>Build number {buildNumber ?? <code>{buildCommit}</code>} {newChangesButton}</p>
{newChangesModal}
</>;
}
18 changes: 18 additions & 0 deletions src/components/menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,22 @@
margin-left: auto;
margin-right: auto;
width: fit-content;
}

p {
font-size: 1.25em;
}

h1 {
font-size: 2.5em;
}

button {
font-size: 1.5em;
padding: 0.5em 1em;
}

li {
margin-bottom: 2em;
list-style: none;
}
23 changes: 19 additions & 4 deletions src/components/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,38 @@ export function Menu({onNewGame}: Props) {

return <main className="menu">
<h1>Wormgine Debug Build</h1>
<p>
The game is still in heavy development, this site is updated with the latest builds as they
are built.
</p>
<h2>Test Scenarios</h2>
<p>
Each of these levels are used to test certain engine features. Gameplay Demo is the most complete,
as it demonstrates a match between two human players.
</p>
<ul>
<li>
<button onClick={() => onStartNewGame("grenadeIsland")}>Open Debug Island</button>
<button onClick={() => onStartNewGame("testingGround")}>Gameplay Demo</button>
</li>
<li>
<button onClick={() => onStartNewGame("borealisTribute")}>Open Borealis Tribute Rock</button>
<button onClick={() => onStartNewGame("grenadeIsland")}>Terrain Demo</button>
</li>
<li>
<button onClick={() => onStartNewGame("testingGround")}>Open Testing Ground</button>
<button onClick={() => onStartNewGame("uiTest")}>UI Test</button>
</li>
<li>
<button onClick={() => onStartNewGame("boneIsles")}>Bone Isles</button>
</li>
<li>
<button onClick={() => onStartNewGame("uiTest")}>UI Test</button>
<button onClick={() => onStartNewGame("borealisTribute")}>Borealis Tribute Rock</button>
</li>
</ul>
<ChangelogModal buildNumber={buildNumber} buildCommit={buildCommit} lastCommit={lastCommit}/>
<p>
You can check out the source code over on <a href="https://github.com/Half-Shot/wormgine" target="_blank">GitHub</a>.
</p>
<p>
<a href="https://github.com/Half-Shot/wormgine/blob/main/src/assets/ASSETS.md">Assets are used under various licences</a>
</p>
</main>;
}

0 comments on commit b764a7e

Please sign in to comment.