Refactor turning unified palette on and off

snap7
Michael Ball 2021-06-07 22:18:27 -10:00
rodzic 3026bcea35
commit 6f8d3fa327
1 zmienionych plików z 12 dodań i 2 usunięć

Wyświetl plik

@ -2022,14 +2022,24 @@ IDE_Morph.prototype.unsetUnifiedPalete = function () {
this.scene.unifiedPalette = false;
this.currentCategory = 'motion';
this.createCategories();
this.refreshPalette();
this.categories.fixLayout();
this.fixLayout();
this.flushBlocksCache();
this.flushPaletteCache();
this.currentSprite.palette(this.currentCategory);
this.refreshPalette(true);
}
IDE_Morph.prototype.setUnifiedPalete = function () {
this.scene.unifiedPalette = true;
this.currentCategory = 'unified';
this.createCategories();
this.refreshPalette();
this.categories.fixLayout();
this.fixLayout();
this.flushBlocksCache();
this.flushPaletteCache();
this.currentSprite.palette(this.currentCategory);
this.refreshPalette(true);
}
// IDE_Morph layout