kopia lustrzana https://github.com/backface/turtlestitch
Refactor turning unified palette on and off
rodzic
3026bcea35
commit
6f8d3fa327
14
src/gui.js
14
src/gui.js
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue