|
|
@ -91,11 +91,13 @@ document.querySelectorAll(".listenerHover").forEach(function (element) {
|
|
|
|
function mouseOver(button) {
|
|
|
|
function mouseOver(button) {
|
|
|
|
button.style.backgroundColor = document.querySelector(".modal-body").style.borderColor;
|
|
|
|
button.style.backgroundColor = document.querySelector(".modal-body").style.borderColor;
|
|
|
|
button.style.color = document.querySelector(".modal-body").style.backgroundColor;
|
|
|
|
button.style.color = document.querySelector(".modal-body").style.backgroundColor;
|
|
|
|
|
|
|
|
button.childNodes[3].style.transform = "rotate(-15deg)";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function mouseOut(button) {
|
|
|
|
function mouseOut(button) {
|
|
|
|
button.style.backgroundColor = document.querySelector(".modal-body").style.backgroundColor;
|
|
|
|
button.style.backgroundColor = document.querySelector(".modal-body").style.backgroundColor;
|
|
|
|
button.style.color = document.querySelector(".modal-body").style.borderColor;
|
|
|
|
button.style.color = document.querySelector(".modal-body").style.borderColor;
|
|
|
|
|
|
|
|
button.childNodes[3].style.transform = "rotate(0deg)";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function setLang(newLang) {
|
|
|
|
function setLang(newLang) {
|
|
|
@ -553,23 +555,47 @@ function changeAllLineColorInActive(color) {
|
|
|
|
colorLineInnactive = color;
|
|
|
|
colorLineInnactive = color;
|
|
|
|
layer.draw();
|
|
|
|
layer.draw();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function hideDiv(div) {
|
|
|
|
|
|
|
|
div.style.display = 'none';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function showDiv(div) {
|
|
|
|
|
|
|
|
if (div.id == "levelSelectionPage") {
|
|
|
|
|
|
|
|
document.querySelectorAll("#right_select").forEach(function (element) {
|
|
|
|
|
|
|
|
element.classList = "fa fa-arrow-right";
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
div.style.display = 'block'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function play() {
|
|
|
|
function play() {
|
|
|
|
document.querySelector("#mainPage").style.display = 'none';
|
|
|
|
hideDiv(document.querySelector("#mainPage"));
|
|
|
|
document.querySelector("#levelSelectionPage").style.display = 'block';
|
|
|
|
showDiv(document.querySelector("#levelSelectionPage"));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function modePerso() {
|
|
|
|
function modePerso() {
|
|
|
|
document.querySelector("#levelSelectionPage").style.display = 'none';
|
|
|
|
document.querySelector("#generate_button_perso").childNodes[3].classList = "fa fa-arrow-right";
|
|
|
|
document.querySelector("#PersoSetupPage").style.display = 'block';
|
|
|
|
hideDiv(document.querySelector("#levelSelectionPage"));
|
|
|
|
|
|
|
|
showDiv(document.querySelector("#PersoSetupPage"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function playNormal() {
|
|
|
|
function playNormal() {
|
|
|
|
document.querySelector("#levelSelectionPage").style.display = 'none';
|
|
|
|
|
|
|
|
document.querySelector("#playPage").style.display = 'block';
|
|
|
|
hideDiv(document.querySelector("#levelSelectionPage"));
|
|
|
|
|
|
|
|
showDiv(document.querySelector("#playPage"));
|
|
|
|
niveauActuel = 1;
|
|
|
|
niveauActuel = 1;
|
|
|
|
timeTot = 0;
|
|
|
|
timeTot = 0;
|
|
|
|
launchGameOne();
|
|
|
|
launchGameOne();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function wait(mode, btn) {
|
|
|
|
|
|
|
|
var time = 300;
|
|
|
|
|
|
|
|
spin(btn);
|
|
|
|
|
|
|
|
switch (mode) {
|
|
|
|
|
|
|
|
case "normal":
|
|
|
|
|
|
|
|
setTimeout(playNormal, time);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "perso":
|
|
|
|
|
|
|
|
setTimeout(modePerso, time);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function colonne_check_setup(value) {
|
|
|
|
function colonne_check_setup(value) {
|
|
|
|
if (value != "" || value != null || value != undefined) {
|
|
|
|
if (value != "" || value != null || value != undefined) {
|
|
|
@ -582,7 +608,6 @@ function colonne_check_setup(value) {
|
|
|
|
var label = document.createElement("label");
|
|
|
|
var label = document.createElement("label");
|
|
|
|
let colonne_number = i + 1;
|
|
|
|
let colonne_number = i + 1;
|
|
|
|
input.type = "number";
|
|
|
|
input.type = "number";
|
|
|
|
input.value = 1;
|
|
|
|
|
|
|
|
input.oninput = refresh_input;
|
|
|
|
input.oninput = refresh_input;
|
|
|
|
input.id = i;
|
|
|
|
input.id = i;
|
|
|
|
input.classList = "input_refresh";
|
|
|
|
input.classList = "input_refresh";
|
|
|
@ -594,11 +619,15 @@ function colonne_check_setup(value) {
|
|
|
|
document.querySelector('#colonne_number_ask').appendChild(div);
|
|
|
|
document.querySelector('#colonne_number_ask').appendChild(div);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
refresh_input();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function refresh_input(e) {
|
|
|
|
function refresh_input() {
|
|
|
|
if (document.querySelector("#colonne_number_setup_global").value == "" || document.querySelector("#colonne_number_setup_global").value == undefined || document.querySelector("#colonne_number_setup_global").value == null)
|
|
|
|
|
|
|
|
document.querySelector("#colonne_number_setup_global").value = "0";
|
|
|
|
document.querySelector("#colonne_number_setup_global").value = "0";
|
|
|
|
document.querySelector("#colonne_number_setup_global").value = parseInt(document.querySelector("#colonne_number_setup_global").value) + parseInt(e.target.value);
|
|
|
|
document.querySelectorAll(".input_refresh").forEach(function (element) {
|
|
|
|
|
|
|
|
if (element.value == "" || element.value == null || element.value == undefined)
|
|
|
|
|
|
|
|
element.value = '0';
|
|
|
|
|
|
|
|
document.querySelector("#colonne_number_setup_global").value = parseInt(document.querySelector("#colonne_number_setup_global").value) + parseInt(element.value);
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function show_more_perso(div) {
|
|
|
|
function show_more_perso(div) {
|
|
|
@ -635,11 +664,20 @@ function clearArray(arr) {
|
|
|
|
|
|
|
|
|
|
|
|
function closeGame() {
|
|
|
|
function closeGame() {
|
|
|
|
timer.stop();
|
|
|
|
timer.stop();
|
|
|
|
document.querySelector("#mainPage").style.display = 'block';
|
|
|
|
showDiv(document.querySelector("#mainPage"));
|
|
|
|
document.querySelector("#playPage").style.display = 'none';
|
|
|
|
hideDiv(document.querySelector("#playPage"));
|
|
|
|
resetAllTabs(false);
|
|
|
|
resetAllTabs(false);
|
|
|
|
tutoCreateLayer();
|
|
|
|
tutoCreateLayer();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function closeSelection() {
|
|
|
|
|
|
|
|
showDiv(document.querySelector("#mainPage"));
|
|
|
|
|
|
|
|
hideDiv(document.querySelector("#levelSelectionPage"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function closePerso() {
|
|
|
|
|
|
|
|
showDiv(document.querySelector("#levelSelectionPage"));
|
|
|
|
|
|
|
|
hideDiv(document.querySelector("#PersoSetupPage"));
|
|
|
|
|
|
|
|
}
|
|
|
|
var rotated = false;
|
|
|
|
var rotated = false;
|
|
|
|
function flip() {
|
|
|
|
function flip() {
|
|
|
|
document.querySelectorAll(".fa").forEach(function (element) {
|
|
|
|
document.querySelectorAll(".fa").forEach(function (element) {
|
|
|
|