diff --git a/edit_size.js b/edit_size.js new file mode 100644 index 0000000..d00a291 --- /dev/null +++ b/edit_size.js @@ -0,0 +1,15 @@ +const controls = document.getElementById("prepControls"); + +const setSizeButton = document.createElement("button"); +setSizeButton.id = "button-imageButton"; +setSizeButton.onclick = () => { + const size = prompt("Enter Food Size (default is 3)"); + if (isNaN(parseFloat(size))) alert("Size must be a number!"); + else foodScale = size; +} +const sizeImage = document.createElement("img"); +sizeImage.src = "../shapes/png/arrow_diagonal_forward.png"; +sizeImage.className = "pixelart"; +setSizeButton.appendChild(sizeImage); + +controls.append(setSizeButton) diff --git a/unhide.js b/unhide.js new file mode 100644 index 0000000..e5f11ba --- /dev/null +++ b/unhide.js @@ -0,0 +1,3 @@ +for (ingredient in ingredients) { + ingredients[ingredient].hidden = false; +}