mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
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:
@ -5,12 +5,7 @@ class Input {
|
||||
|
||||
element.addEventListener(event,
|
||||
function (e) {
|
||||
// e = event
|
||||
//this = element clicked
|
||||
functionCallback(e, ...args);
|
||||
//if you need to access the event or this variable, you need to add them
|
||||
//when you define the callback, but you cant use the word this, eg:
|
||||
//on('click', menuButton, function (e, button) {});
|
||||
functionCallback(...args, e);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user