CS-Coursework/website/screens/testscreen.js

18 lines
524 B
JavaScript
Raw Normal View History

2022-10-11 09:45:40 +01:00
class TestScreen {
constructor() {
2022-11-11 13:04:13 +00:00
this.textbox = new Textbox(100,100,windowWidth - 100,windowHeight,0,true,"#000", false, "#000", "#000");
2022-10-11 09:45:40 +01:00
screenManager.timer = new Timer(0,0,windowWidth,50,0,true,"#fff", true, "#000", "#666", 15, true);
screenManager.timer.start();
}
draw() {
background("#eeeee4");
2022-11-11 13:04:13 +00:00
this.textbox.draw();
2022-10-11 09:45:40 +01:00
screenManager.timer.draw();
screenManager.timer.tick();
}
2022-11-11 13:04:13 +00:00
letterTyped(key) {
this.textbox.letterTyped(key);
}
2022-10-11 09:45:40 +01:00
}