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

View File

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

View File

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