Added ui and text

This commit is contained in:
sam
2023-12-19 15:31:22 +01:00
parent 259d0136f5
commit f99e16075a

View File

@@ -70,7 +70,6 @@ function setup() {
createCanvas(width, height); createCanvas(width, height);
frameRate(framerate); frameRate(framerate);
angleMode(DEGREES); angleMode(DEGREES);
// disable the outline of shapes // disable the outline of shapes
Movementloop() Movementloop()
noStroke(); noStroke();
@@ -472,15 +471,32 @@ function homescreen() {
textAlign(CENTER); textAlign(CENTER);
button(0, 0, 0, width / 2 - 90, height / 2, 200, 40, "Start Game") button(0, 0, 0, width / 2 - 90, height / 2, 200, 40, "Start Game")
button(0, 0, 0, width / 2 - 90, height / 2 + 50, 200, 40, "Scores") button(0, 0, 0, width / 2 - 90, height / 2 + 50, 200, 40, "Scores")
push()
stroke(255, 0, 0)
strokeWeight(5)
fill(0, 255, 0, 0)
rect(100, 150, 300, 400)
pop()
push()
textSize(50)
fill(255, 0, 0)
text("Highscores", 250, 200)
pop()
push() push()
stroke(255, 0, 0) stroke(255, 0, 0)
strokeWeight(5) strokeWeight(5)
fill(0, 255, 0, 0) fill(0, 255, 0, 0)
rect(100, 150, 300, 400, 20, 20, 20, 20) rect(860, 150, 300, 400)
pop() pop()
push()
textSize(50)
fill(255, 0, 0)
text("Controls", 1000, 200)
pop()
} }