2022-11-28 11:04:49 +00:00
|
|
|
/**
|
|
|
|
* @file This file is the base screen when the user visits the site
|
|
|
|
* @author Arlo Filley
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This screen class is the base screen. It provides the user with basic instructions
|
|
|
|
* and a set of menus to navigate the site
|
|
|
|
*/
|
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() {
|
|
|
|
textSize(100);
|
|
|
|
textAlign(CENTER, CENTER);
|
2022-12-01 14:41:14 +00:00
|
|
|
fill(user.colorScheme.text);
|
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-12-01 14:41:14 +00:00
|
|
|
fill(user.colorScheme.text);
|
|
|
|
text(`Logged in as ${user.username}`, windowWidth-150, 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
|
|
|
}
|
|
|
|
}
|