Added a options menu with working sliders and buttons

This commit is contained in:
2020-03-15 23:35:46 +01:00
parent a9bfbe4f95
commit ec6ae74633
8 changed files with 118 additions and 9 deletions

View File

@@ -1,4 +0,0 @@
$("<h1>Include this using jquery</h1>").appendTo("body");
console.log($("body").html());

View File

@@ -134,7 +134,7 @@ function make_playground() {
function clear_playground() { //When called, makes the playground empty
document.getElementById("test-group").innerHTML = "";
clear_values();
} //hello
}
function randomized() { // Fills the array with random numbers. Max number determines by level
while (play_array.length < difficulty) {
@@ -167,7 +167,7 @@ function reply_click(clicked_id) { // Grabs the value from the id on the div/car
} else {
document.getElementById("score").innerHTML = parseInt(x) * 2 + 30;
}
alert("You survived this round!");
// alert("You survived this round!");
nextRound();
}
}

25
scripts/options.js Normal file
View File

@@ -0,0 +1,25 @@
// gameboard.js required
function when_clicked(){
document.getElementById("particles-js").style.backgroundImage = "url(assets/textures/options.png)";
document.getElementById("start-the-game").style.display = "none";
document.getElementById("options-window").style.display = "flex";
}
function when_clicked_back(){
document.getElementById("particles-js").style.backgroundImage = "url(assets/textures/bg.png)";
document.getElementById("start-the-game").style.display = "flex";
document.getElementById("options-window").style.display = "none";
}
function check() {
showcontent = true;
document.getElementById("button-text-01").innerHTML = "Turn off card numbers";
}
function uncheck() {
showcontent = false;
document.getElementById("button-text-01").innerHTML = "Turn on card numbers";
}
function cardspeed(){
viewspeed = document.getElementById("card-speed-number-value").value;
document.getElementById("range-value").innerText = document.getElementById("card-speed-number-value").value;
}