diff --git a/index.html b/index.html
index d0d73e9..067678b 100644
--- a/index.html
+++ b/index.html
@@ -37,6 +37,7 @@
DATE
+
diff --git a/script.js b/script.js
index cc1cfb3..1187a41 100644
--- a/script.js
+++ b/script.js
@@ -110,6 +110,8 @@ let redBlueLineImage = new Image();
redBlueLineImage.src = "red-blue-lines.png";
let greyDottedLineImage = new Image();
greyDottedLineImage.src = "grey-dotted-lines.png";
+let squaresImage = new Image();
+squaresImage.src = "squares.png";
let quillImage = new Image();
quillImage.src = "quill.svg";
@@ -265,7 +267,14 @@ backgroundButton4.onclick = function()
selectedPageButton = 3;
selectPageButton();
}
-
+backgroundButton5.onclick = function()
+{
+ selectedBackground = squaresImage;
+ resetcanvasWriter(ctx);
+ storedLines = [];
+ selectedPageButton = 4;
+ selectPageButton();
+}
function selectPageButton()
{
if (selectedPageButton == 0)
@@ -274,6 +283,7 @@ function selectPageButton()
document.getElementById("backgroundButton2").innerHTML = "Background 2";
document.getElementById("backgroundButton3").innerHTML = "Background 3";
document.getElementById("backgroundButton4").innerHTML = "Background 4";
+ document.getElementById("backgroundButton5").innerHTML = "Background 5";
}
else if (selectedPageButton == 1)
{
@@ -281,6 +291,7 @@ function selectPageButton()
document.getElementById("backgroundButton2").innerHTML = "Background 2";
document.getElementById("backgroundButton3").innerHTML = "Background 3";
document.getElementById("backgroundButton4").innerHTML = "Background 4";
+ document.getElementById("backgroundButton5").innerHTML = "Background 5";
}
else if (selectedPageButton == 2)
{
@@ -288,6 +299,7 @@ function selectPageButton()
document.getElementById("backgroundButton2").innerHTML = "Background 2";
document.getElementById("backgroundButton3").innerHTML = "Background 3";
document.getElementById("backgroundButton4").innerHTML = "Background 4";
+ document.getElementById("backgroundButton5").innerHTML = "Background 5";
}
else if (selectedPageButton == 3)
{
@@ -295,6 +307,15 @@ function selectPageButton()
document.getElementById("backgroundButton2").innerHTML = "Background 2";
document.getElementById("backgroundButton3").innerHTML = "Background 3";
document.getElementById("backgroundButton4").innerHTML = "Background 4";
+ document.getElementById("backgroundButton5").innerHTML = "Background 5";
+ }
+ else if (selectedPageButton == 4)
+ {
+ document.getElementById("backgroundButton1").innerHTML = "Background 1";
+ document.getElementById("backgroundButton2").innerHTML = "Background 2";
+ document.getElementById("backgroundButton3").innerHTML = "Background 3";
+ document.getElementById("backgroundButton4").innerHTML = "Background 4";
+ document.getElementById("backgroundButton5").innerHTML = "Background 5";
}
}
diff --git a/squares.png b/squares.png
new file mode 100644
index 0000000..1393b66
Binary files /dev/null and b/squares.png differ