2022-10-11 09:45:40 +01:00
|
|
|
class StartScreen {
|
|
|
|
constructor() {
|
2022-11-18 14:51:05 +00:00
|
|
|
this.menu = new Menu();
|
2022-10-11 09:45:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
draw() {
|
|
|
|
background("#eeeee4");
|
|
|
|
textSize(100);
|
|
|
|
textAlign(CENTER, CENTER);
|
2022-11-11 13:04:13 +00:00
|
|
|
fill("#000");
|
2022-10-11 09:45:40 +01:00
|
|
|
text("Press enter to start test", 0, 0, windowWidth - 100, windowHeight - 100);
|
2022-11-18 11:33:25 +00:00
|
|
|
|
2022-11-18 14:51:05 +00:00
|
|
|
this.menu.draw();
|
2022-11-18 11:33:25 +00:00
|
|
|
|
2022-11-11 19:54:52 +00:00
|
|
|
fill("#000");
|
2022-11-18 12:27:54 +00:00
|
|
|
text(`Logged in as ${user.username}`, windowWidth-400, 15);
|
2022-11-11 13:04:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
letterTyped(key) {
|
|
|
|
if (key === "Enter") {
|
|
|
|
screenManager.setScreen(new TestScreen());
|
|
|
|
}
|
2022-10-11 09:45:40 +01:00
|
|
|
}
|
|
|
|
}
|