sam
2024-01-19 10:07:07 +01:00
3 changed files with 20 additions and 16 deletions

View File

@@ -15,7 +15,11 @@ function preload() {
}
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")
@@ -58,8 +62,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()
}