Main menu and save function to json file implemented.

This commit is contained in:
Mal
2020-02-02 23:00:14 +01:00
parent 9c3aca1bc9
commit d893483da9
11 changed files with 252 additions and 7 deletions

View File

@@ -0,0 +1,27 @@
export default class MainMenu
{
constructor(id)
{
this.id = id;
this.menuGroups = [];
}
addMenuGroup(group)
{
this.menuGroups.push(group);
}
getElement()
{
let htmlElement = document.createElement('div');
htmlElement.id = this.id;
this.menuGroups.forEach(
(group) =>{
htmlElement.appendChild(group.getElement());
}
);
return htmlElement;
}
}