Added FileManager and TopMenuModule

The TopMenuModule binds the buttons so that they open the sub menus: at the moment it also binds those events that don't have a proper place yet. FileManager contains all the functions that have something to do with files, that is loading, opening, saving and exporting.
This commit is contained in:
unsettledgames
2021-07-15 22:21:19 +02:00
parent 9540002c6e
commit f76d05bffa
10 changed files with 303 additions and 299 deletions

View File

@@ -90,8 +90,6 @@ const Startup = (() => {
currentLayer.canvas.style.zIndex = 2;
}
else {
// If it's not the first Pixel, I have to reset the app
// Deleting all the extra layers and canvases, leaving only one
let nLayers = layers.length;
for (let i=2; i < layers.length - nAppLayers; i++) {
@@ -198,7 +196,7 @@ const Startup = (() => {
}
}
// OPTIMIZABLE: should probably moved to a FileManagement class or something
// REFACTOR: should probably moved to a FileManagement class or something
function loadLPE(fileContent) {
// I add every layer the file had in it
for (let i=0; i<fileContent['nLayers']; i++) {