diff --git a/code/button_displayer.js b/code/button_displayer.js index 40e60cc..171f88c 100644 --- a/code/button_displayer.js +++ b/code/button_displayer.js @@ -3,15 +3,15 @@ var diffs=["easy","med","hard"]; var div=document.getElementById('buttons'); size=screen.height/6; hideAll(); -var modeSelected=null; -var diffSelected=null; +var modeSelected="5p"; +var diffSelected="easy"; var btn_options=document.getElementById("btn_options"); btn_options.width=size/2; document.getElementById("btn_play").width=size; -document.getElementById("btn_play_des").width=size; -document.getElementById("btn_play").style.display="none"; +//document.getElementById("btn_play_des").width=size; +document.getElementById("btn_play").style.display="inline"; document.getElementById("btn_high").width=size; @@ -76,9 +76,9 @@ diffs.forEach(element => { }); }) -function disp(what) +function disp(what, short=false) { - what=what.currentTarget.id.substring(4); + what=(short ? what : what.currentTarget.id.substring(4)); modes.forEach(element => { document.getElementById(element).style.display=what==element ? "flex":"none"; }) @@ -103,4 +103,9 @@ function play() function goHigh() { window.location.replace("./highscores.php"); -} \ No newline at end of file +} + +disp("points",true); +document.getElementById("btn_points").classList.add("selected"); +document.getElementById("5p").classList.add("selected"); +document.getElementById("btn_easy").classList.add("selected"); \ No newline at end of file diff --git a/code/index.php b/code/index.php index 41c5769..3f21152 100644 --- a/code/index.php +++ b/code/index.php @@ -53,7 +53,7 @@ -->