From aa4da9883955c45ecab679e7baa81786199f9690 Mon Sep 17 00:00:00 2001 From: Mees Roelofsz Date: Fri, 19 Jan 2024 12:31:15 +0100 Subject: [PATCH] added button to score + changed buttons --- web/js/Menu.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/web/js/Menu.js b/web/js/Menu.js index c7f9de9..aa1c7e5 100644 --- a/web/js/Menu.js +++ b/web/js/Menu.js @@ -1,6 +1,5 @@ let buttonSelectScore = 0; let searchName = ''; -let scorescreenOn = false; let dataIsCalled = false; let clearDataOnce = false; function keyPressed() { @@ -56,7 +55,7 @@ function homescreen() { function button(r, g, b, buttonX, buttonY, buttonText) { push() - fill(0, 0, 50) + noFill() rectMode(CENTER); rect(buttonX, buttonY, buttonWidth, buttonHeight) textSize(25) @@ -133,14 +132,18 @@ function scoremenu() { strokeWeight(5) fill(0, 255, 0, 0) //box left - rect(width / 4 * 3, height / 2, width / 3, height / 1.25) + rect(width / 4 * 3, height / 2, width / 3.5, height / 1.25) //box right - rect(width / 4, height / 2, width / 3, height / 1.25) + rect(width / 4, height / 2, width / 3.5, height / 1.25) pop() push() text("Your scores", width / 4, height / 6) text("Your achievements", width / 4 * 3, height / 6) pop() + + push() + button(255, 255, 255, width / 2, height / 2, "Main Menu") + pop() } function gameOver() {