added title and changed buttontext

This commit is contained in:
Mees Roelofsz
2024-01-19 09:14:32 +01:00
parent d54ad9bc3f
commit ca796124f1

View File

@@ -11,7 +11,11 @@ function keyPressed() {
}
function homescreen() {
textAlign(CENTER);
textAlign(CENTER, CENTER);
textSize(70);
fill(100, 255, 100);
text("Slime\nSymphony", width / 2, height / 4);
button(255, 255, 255, width / 2, height / 2, "Start Game")
button(255, 255, 255, width / 2, height / 2 + height / 12, "Scores")
@@ -50,8 +54,7 @@ function button(r, g, b, buttonX, buttonY, buttonText) {
textSize(25)
fill(r, g, b)
textAlign(CENTER);
text(buttonText, buttonX, buttonY + buttonHeight / 4)
text(buttonText, buttonX, buttonY)
pop()
}