mr-crocs-adventures/js/ui/UserInterface.js

25 lines
431 B
JavaScript
Raw Normal View History

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);
}
}
)
}
}