mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
UserInterface with TextMessages implemented.
This commit is contained in:
25
js/ui/UserInterface.js
Normal file
25
js/ui/UserInterface.js
Normal 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);
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user