Finished binding events to splash page

Must write the log update and maybe find a way to randomize the splash images
This commit is contained in:
unsettledgames
2021-04-25 12:41:36 +02:00
parent 238eaf1783
commit 04afee2172
8 changed files with 901 additions and 29 deletions

View File

@@ -196,9 +196,21 @@ function newPixel (width, height, editorMode, fileContent = null) {
// Applying the correct editor mode
if (pixelEditorMode == 'Basic') {
switchMode('Advanced', false);
switchMode(false);
}
else {
switchMode('Basic', false);
switchMode(false);
}
}
function newFromTemplate(preset, x, y) {
if (preset != '') {
setText('palette-button-splash', presets[preset].palette);
setText('palette-button', presets[preset].palette);
x = presets[preset].width;
y = presets[preset].height;
}
newPixel(x, y, pixelEditorMode == 'Advanced' ? 'Basic' : 'Advanced');
}