added scoremenu and used name functions
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
let buttonSelectScore = 0;
|
||||
let searchName = '';
|
||||
let scorescreenOn = false;
|
||||
function scoremenu() {
|
||||
|
||||
textSize(50)
|
||||
fill(255, 255, 255)
|
||||
text("Hi, dit is een scorescreen", width / 2, height / 2 - 100)
|
||||
}
|
||||
|
||||
function keyPressed() {
|
||||
// Check if the back button was selected and the Enter key was pressed
|
||||
@@ -77,3 +71,19 @@ function pauseMenu(){
|
||||
button(255, 255, 255, width / 2, height / 2, "Resume");
|
||||
button(255, 255, 255, width / 2, height / 2 + height / 12, "Main Menu");
|
||||
}
|
||||
|
||||
function scoremenu() {
|
||||
textAlign(CENTER);
|
||||
textSize(50);
|
||||
fill(255, 255, 255);
|
||||
text("Score", width / 2, height / 2 - height / 6);
|
||||
textSize(32);
|
||||
text(letters[currentIndex[0]], width / 2 - 30, height / 2);
|
||||
text(letters[currentIndex[1]], width / 2, height / 2);
|
||||
text(letters[currentIndex[2]], width / 2 + 30, height / 2);
|
||||
|
||||
if (scorescreenOn && keyReleasedFlag) {
|
||||
nameSubmit();
|
||||
}
|
||||
nameDraw();
|
||||
}
|
Reference in New Issue
Block a user