further improved gui

This commit is contained in:
Cuptain 2024-06-23 15:12:05 +10:00
parent b615c91c10
commit b4c0dd218e
3 changed files with 12 additions and 10 deletions

View File

@ -17,6 +17,8 @@
<div class="Logo"> <div class="Logo">
<img src="assets/Title.png" alt="Title" id="Title"> <img src="assets/Title.png" alt="Title" id="Title">
</div> </div>
<div class="container"> <div class="container">
@ -26,8 +28,8 @@
<select name="modSelect" id="Modpacks"> <select name="modSelect" id="Modpacks">
</select> </select>
<button id="idsButton" type="button">Show Id</button> <button id="launchGame" type="button">Launch Minecraft</button>
<p type="text" id="showTheId"></p>
</div> </div>
</body> </body>
</html> </html>

View File

@ -11,8 +11,8 @@ async function greet() {
window.addEventListener("DOMContentLoaded", () => { window.addEventListener("DOMContentLoaded", () => {
document.getElementById("idsButton").addEventListener("click", viewIds); document.getElementById("launchGame").addEventListener("click", gameLaunch);
console.log("testing");
}); });
function packSelect() { function packSelect() {
document.getElementById("myDropdown").classList.toggle("show"); document.getElementById("myDropdown").classList.toggle("show");
@ -45,11 +45,11 @@ function addModpacks(modpacks) {
dropdown.options.add(opt); dropdown.options.add(opt);
} }
} }
function viewIds() { function gameLaunch() {
var packId = document.getElementById("Modpacks"); var packId = document.getElementById("Modpacks");
var selectedId = packId.value; var selectedId = packId.value;
document.getElementById("showTheId").textContent = selectedId; //TODO Launch Game
console.log(selectedId);
} }

View File

@ -19,7 +19,7 @@
.container { .container {
margin: 0; margin: 0;
padding-top: 0vh; padding-top: 30px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@ -173,6 +173,6 @@ button {
background-repeat: no-repeat; background-repeat: no-repeat;
flex-direction: column; flex-direction: column;
} }
#Title { #launchGame {
margin-top: 20px;
} }