Banks[name].el.click(); | Banks[name].el.click(); | ||||
} | } | ||||
return this; | return this; | ||||
} | |||||
} | |||||
clear(){ | clear(){ | ||||
Object.keys(Banks).forEach((item) => { | Object.keys(Banks).forEach((item) => { |
import Utils from "/app/js/common/Utils.js"; | import Utils from "/app/js/common/Utils.js"; | ||||
import NESBank from "/app/js/models/NESBank.js"; | import NESBank from "/app/js/models/NESBank.js"; | ||||
import NESPalette from "/app/js/models/NESPalette.js"; | import NESPalette from "/app/js/models/NESPalette.js"; | ||||
import CTRLPalettesStore from "/app/js/ctrls/CTRLPalettesStore.js"; | |||||
import CTRLBanksStore from "/app/js/ctrls/CTRLBanksStore.js"; | |||||
var SURF = null; | var SURF = null; | ||||
function LoadFile(file){ | function LoadFile(file){ | ||||
if (SURF !== null){ | if (SURF !== null){ | ||||
var reader = new FileReader(); | |||||
if (SURF instanceof NESBank){ | if (SURF instanceof NESBank){ | ||||
var reader = new FileReader(); | |||||
reader.onload = function(e){ | reader.onload = function(e){ | ||||
try { | try { | ||||
SURF.chr = new Uint8Array(e.target.result); | SURF.chr = new Uint8Array(e.target.result); | ||||
e[i].addEventListener("dragover", HANDLE_DragOver); | e[i].addEventListener("dragover", HANDLE_DragOver); | ||||
e[i].addEventListener("drop", HANDLE_FileDrop); | e[i].addEventListener("drop", HANDLE_FileDrop); | ||||
} | } | ||||
CTRLPalettesStore.initialize(); | |||||
CTRLBanksStore.initialize(); | |||||
} | } | ||||
} | } | ||||
import Tabs from "/app/js/ui/Tabs.js"; | import Tabs from "/app/js/ui/Tabs.js"; | ||||
import CTRLPalettes from "/app/js/ctrls/CTRLPalettes.js"; | import CTRLPalettes from "/app/js/ctrls/CTRLPalettes.js"; | ||||
import CTRLPainter from "/app/js/ctrls/CTRLPainter.js"; | import CTRLPainter from "/app/js/ctrls/CTRLPainter.js"; | ||||
import CTRLPalettesStore from "/app/js/ctrls/CTRLPalettesStore.js"; | |||||
import CTRLBanksStore from "/app/js/ctrls/CTRLBanksStore.js"; | |||||
import CTRLBankTools from "/app/js/ctrls/CTRLBankTools.js"; | import CTRLBankTools from "/app/js/ctrls/CTRLBankTools.js"; | ||||
import CTRLIO from "/app/js/ctrls/CTRLIO.js"; | import CTRLIO from "/app/js/ctrls/CTRLIO.js"; | ||||
CTRLPainter.initialize(); | CTRLPainter.initialize(); | ||||
CTRLBankTools.initialize(); | CTRLBankTools.initialize(); | ||||
CTRLPalettesStore.initialize(); | |||||
CTRLBanksStore.initialize(); | |||||
CTRLIO.initialize(); | CTRLIO.initialize(); | ||||
var cover = document.querySelector(".cover"); | var cover = document.querySelector(".cover"); |