From c1c4fca1db2ae1dbee90df59f664b724ec962a1e Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Sun, 8 Nov 2020 10:09:04 +0000 Subject: [PATCH] reset function --- script.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/script.js b/script.js index 28c46e6..82b036d 100644 --- a/script.js +++ b/script.js @@ -239,8 +239,17 @@ async function run() { buttonAddImage.addEventListener("click", addImage); buttonAddImage.addEventListener("touchend", addImage); + // would it be easier just to reload the page? lol function reset() { clear_game(); + // todo clear file inputs + inputBrightness.value = 0; + inputRoomName.value = ""; + selectPalette.innerHTML = ""; + divNewPalette.style.display = "none"; + inputColourBackground.value = "#2f4ac9"; + inputColourForeground.value = "#8798fe"; + checkboxDither.checked = true; } buttonReset.addEventListener("click", reset);