reset function

This commit is contained in:
Max Bradbury 2020-11-08 10:09:04 +00:00
parent e5da032236
commit c1c4fca1db
1 changed files with 9 additions and 0 deletions

View File

@ -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);