UserInterface with TextMessages implemented.

This commit is contained in:
Mal
2020-02-24 21:09:21 +01:00
parent 88d1c0db87
commit 479a150f9d
9 changed files with 167 additions and 41 deletions

25
js/ui/UserInterface.js Normal file
View File

@@ -0,0 +1,25 @@
export default class UserInterface
{
constructor()
{
this.textBoxes = [];
}
addTextBox(textBox)
{
this.textBoxes.push(textBox);
return this.textBoxes.length - 1;
}
draw(context)
{
this.textBoxes.forEach(
(textBox) => {
if (textBox.isVisible) {
textBox.draw(context);
}
}
)
}
}