more migration for toggle button label variants

pull/95/head
jmoenig 2020-02-21 18:45:00 +01:00
rodzic 66b1104287
commit 2b4cb9ec5f
2 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -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() {

Wyświetl plik

@ -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();