kopia lustrzana https://github.com/backface/turtlestitch
more migration for toggle button label variants
rodzic
66b1104287
commit
2b4cb9ec5f
|
|
@ -35,20 +35,20 @@
|
|||
window.onload = function () {
|
||||
world = new WorldMorph(document.getElementById('world'));
|
||||
world.isDevMode = false;
|
||||
//new IDE_Morph().openIn(world);
|
||||
|
||||
// new IDE_Morph().openIn(world);
|
||||
///*
|
||||
var t = new ToggleButtonMorph(
|
||||
null,
|
||||
null,
|
||||
() => world.isDevMode = !world.isDevMode,
|
||||
new SymbolMorph('gears'), //'dev mode',
|
||||
[new SymbolMorph('gears'), new SymbolMorph('globe')], //'dev mode',
|
||||
() => world.isDevMode,
|
||||
null,
|
||||
'hacker possibilities'
|
||||
);
|
||||
t.setPosition(new Point(100, 100));
|
||||
world.add(t);
|
||||
|
||||
//*/
|
||||
loop();
|
||||
};
|
||||
function loop() {
|
||||
|
|
|
|||
|
|
@ -820,13 +820,15 @@ ToggleButtonMorph.prototype.createLabel = function () {
|
|||
this.labelShadowOffset : none;
|
||||
this.label.shadowColor = this.labelShadowColor;
|
||||
this.label.color = this.labelColor;
|
||||
this.label.drawNew();
|
||||
this.label.fixLayout();
|
||||
this.label.rerender();
|
||||
|
||||
this.trueStateLabel.shadowOffset = shading ?
|
||||
this.labelShadowOffset : none;
|
||||
this.trueStateLabel.shadowColor = this.labelShadowColor;
|
||||
this.trueStateLabel.color = this.labelColor;
|
||||
this.trueStateLabel.drawNew();
|
||||
this.trueStateLabel.fixLayout();
|
||||
this.trueStateLabel.rerender();
|
||||
}
|
||||
} else if (this.labelString[0] instanceof Morph) {
|
||||
this.label = this.labelString[0].fullCopy();
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue