Added back brush with new tool system

This commit is contained in:
unsettledgames
2021-10-27 10:02:21 +02:00
parent 222228a6ce
commit 35cbe31a71
21 changed files with 217 additions and 125 deletions

View File

@ -180,9 +180,14 @@ const FileManager = (() => {
reader.onload = function (e) {
let dictionary = JSON.parse(e.target.result);
Startup.newPixel(dictionary['canvasWidth'], dictionary['canvasHeight'], dictionary);
for (let i=0; i<dictionary['color' + i] != null; i++) {
for (let i=0; dictionary['color' + i] != null; i++) {
ColorModule.addColor(dictionary['color'+i]);
}
// Removing the default colours
ColorModule.deleteColor(ColorModule.getCurrentPalette()[0]);
ColorModule.deleteColor(ColorModule.getCurrentPalette()[0]);
}
}