The way I have this patch set up should make the tab order to go Scripts, Costumes, Sounds, and FX inspector. Except, Scripts is all the way before FX inspector.
// monkey-patch sprite bar creation
window.onerror = error => world.hint(error)
window.csbPrepatch = window.csbPrepatch || IDE_Morph.prototype.createSpriteBar;
window.csbPrepatch.apply(world.children[0]);
IDE_Morph.prototype.createSpriteBar = function (...args) {
const result = csbPrepatch.apply(this, args) // run the prepatched function
let tabBar = this.spriteBar.tabBar
let tab = new TabMorph(
this.tabColors,
null, // target
() => tabBar.tabTo('effects'),
[ // label
new SymbolMorph('notes', 10),
localize('FX inspector')
],
() => this.currentTab === 'effects' // query
);
tab.padding = 3;
tab.corner = 15;
tab.edge = 1;
tab.labelShadowOffset = new Point(-1, -1);
tab.labelShadowColor = this.tabColors[1];
tab.labelColor = this.buttonLabelColor;
tab.fixLayout();
tabBar.add(tab);
tabBar.fixLayout();
return result
}
![]()
As you can see, Scripts is not at the start of the tabs - where it should be.
Can anyone with a keen eye figure out the actual problem with this, or should I resort to what 3D Beetle did with the 3D window button in the palette?
