kopia lustrzana https://github.com/backface/turtlestitch
migrated control bar
rodzic
2b4cb9ec5f
commit
decefb6ef1
|
@ -35,8 +35,8 @@
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
world = new WorldMorph(document.getElementById('world'));
|
world = new WorldMorph(document.getElementById('world'));
|
||||||
world.isDevMode = false;
|
world.isDevMode = false;
|
||||||
// new IDE_Morph().openIn(world);
|
new IDE_Morph().openIn(world);
|
||||||
///*
|
/*
|
||||||
var t = new ToggleButtonMorph(
|
var t = new ToggleButtonMorph(
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
);
|
);
|
||||||
t.setPosition(new Point(100, 100));
|
t.setPosition(new Point(100, 100));
|
||||||
world.add(t);
|
world.add(t);
|
||||||
//*/
|
*/
|
||||||
loop();
|
loop();
|
||||||
};
|
};
|
||||||
function loop() {
|
function loop() {
|
||||||
|
|
19
src/gui.js
19
src/gui.js
|
@ -78,7 +78,7 @@ Animation, BoxMorph, BlockEditorMorph, BlockDialogMorph, Note*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.gui = '2020-January-28';
|
modules.gui = '2020-February-24';
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
|
|
||||||
|
@ -562,6 +562,7 @@ IDE_Morph.prototype.openIn = function (world) {
|
||||||
IDE_Morph.prototype.buildPanes = function () {
|
IDE_Morph.prototype.buildPanes = function () {
|
||||||
this.createLogo();
|
this.createLogo();
|
||||||
this.createControlBar();
|
this.createControlBar();
|
||||||
|
return; // +++
|
||||||
this.createCategories();
|
this.createCategories();
|
||||||
this.createPalette();
|
this.createPalette();
|
||||||
this.createStage();
|
this.createStage();
|
||||||
|
@ -647,7 +648,7 @@ IDE_Morph.prototype.createControlBar = function () {
|
||||||
this.controlBar = new Morph();
|
this.controlBar = new Morph();
|
||||||
this.controlBar.color = this.frameColor;
|
this.controlBar.color = this.frameColor;
|
||||||
this.controlBar.setHeight(this.logo.height()); // height is fixed
|
this.controlBar.setHeight(this.logo.height()); // height is fixed
|
||||||
this.controlBar.mouseClickLeft = function () {
|
this.controlBar.mouseClickLeft = function () { // +++ is this needed?
|
||||||
this.world().fillPage();
|
this.world().fillPage();
|
||||||
};
|
};
|
||||||
this.add(this.controlBar);
|
this.add(this.controlBar);
|
||||||
|
@ -676,7 +677,6 @@ IDE_Morph.prototype.createControlBar = function () {
|
||||||
button.labelShadowColor = colors[1];
|
button.labelShadowColor = colors[1];
|
||||||
button.labelColor = this.buttonLabelColor;
|
button.labelColor = this.buttonLabelColor;
|
||||||
button.contrast = this.buttonContrast;
|
button.contrast = this.buttonContrast;
|
||||||
button.drawNew();
|
|
||||||
// button.hint = 'stage size\nsmall & normal';
|
// button.hint = 'stage size\nsmall & normal';
|
||||||
button.fixLayout();
|
button.fixLayout();
|
||||||
button.refresh();
|
button.refresh();
|
||||||
|
@ -708,7 +708,6 @@ IDE_Morph.prototype.createControlBar = function () {
|
||||||
button.labelShadowColor = colors[1];
|
button.labelShadowColor = colors[1];
|
||||||
button.labelColor = this.buttonLabelColor;
|
button.labelColor = this.buttonLabelColor;
|
||||||
button.contrast = this.buttonContrast;
|
button.contrast = this.buttonContrast;
|
||||||
button.drawNew();
|
|
||||||
// button.hint = 'app & edit\nmodes';
|
// button.hint = 'app & edit\nmodes';
|
||||||
button.fixLayout();
|
button.fixLayout();
|
||||||
button.refresh();
|
button.refresh();
|
||||||
|
@ -741,7 +740,6 @@ IDE_Morph.prototype.createControlBar = function () {
|
||||||
button.labelShadowColor = colors[1];
|
button.labelShadowColor = colors[1];
|
||||||
button.labelColor = this.buttonLabelColor;
|
button.labelColor = this.buttonLabelColor;
|
||||||
button.contrast = this.buttonContrast;
|
button.contrast = this.buttonContrast;
|
||||||
button.drawNew();
|
|
||||||
button.hint = 'Visible stepping';
|
button.hint = 'Visible stepping';
|
||||||
button.fixLayout();
|
button.fixLayout();
|
||||||
button.refresh();
|
button.refresh();
|
||||||
|
@ -776,7 +774,6 @@ IDE_Morph.prototype.createControlBar = function () {
|
||||||
button.labelShadowColor = colors[1];
|
button.labelShadowColor = colors[1];
|
||||||
button.labelColor = new Color(200, 0, 0);
|
button.labelColor = new Color(200, 0, 0);
|
||||||
button.contrast = this.buttonContrast;
|
button.contrast = this.buttonContrast;
|
||||||
button.drawNew();
|
|
||||||
// button.hint = 'stop\nevery-\nthing';
|
// button.hint = 'stop\nevery-\nthing';
|
||||||
button.fixLayout();
|
button.fixLayout();
|
||||||
button.refresh();
|
button.refresh();
|
||||||
|
@ -808,7 +805,6 @@ IDE_Morph.prototype.createControlBar = function () {
|
||||||
button.labelShadowColor = colors[1];
|
button.labelShadowColor = colors[1];
|
||||||
button.labelColor = new Color(255, 220, 0);
|
button.labelColor = new Color(255, 220, 0);
|
||||||
button.contrast = this.buttonContrast;
|
button.contrast = this.buttonContrast;
|
||||||
button.drawNew();
|
|
||||||
// button.hint = 'pause/resume\nall scripts';
|
// button.hint = 'pause/resume\nall scripts';
|
||||||
button.fixLayout();
|
button.fixLayout();
|
||||||
button.refresh();
|
button.refresh();
|
||||||
|
@ -832,7 +828,6 @@ IDE_Morph.prototype.createControlBar = function () {
|
||||||
button.labelShadowColor = colors[1];
|
button.labelShadowColor = colors[1];
|
||||||
button.labelColor = new Color(0, 200, 0);
|
button.labelColor = new Color(0, 200, 0);
|
||||||
button.contrast = this.buttonContrast;
|
button.contrast = this.buttonContrast;
|
||||||
button.drawNew();
|
|
||||||
// button.hint = 'start green\nflag scripts';
|
// button.hint = 'start green\nflag scripts';
|
||||||
button.fixLayout();
|
button.fixLayout();
|
||||||
startButton = button;
|
startButton = button;
|
||||||
|
@ -875,7 +870,6 @@ IDE_Morph.prototype.createControlBar = function () {
|
||||||
button.labelShadowColor = colors[1];
|
button.labelShadowColor = colors[1];
|
||||||
button.labelColor = this.buttonLabelColor;
|
button.labelColor = this.buttonLabelColor;
|
||||||
button.contrast = this.buttonContrast;
|
button.contrast = this.buttonContrast;
|
||||||
button.drawNew();
|
|
||||||
// button.hint = 'open, save, & annotate project';
|
// button.hint = 'open, save, & annotate project';
|
||||||
button.fixLayout();
|
button.fixLayout();
|
||||||
projectButton = button;
|
projectButton = button;
|
||||||
|
@ -899,7 +893,6 @@ IDE_Morph.prototype.createControlBar = function () {
|
||||||
button.labelShadowColor = colors[1];
|
button.labelShadowColor = colors[1];
|
||||||
button.labelColor = this.buttonLabelColor;
|
button.labelColor = this.buttonLabelColor;
|
||||||
button.contrast = this.buttonContrast;
|
button.contrast = this.buttonContrast;
|
||||||
button.drawNew();
|
|
||||||
// button.hint = 'edit settings';
|
// button.hint = 'edit settings';
|
||||||
button.fixLayout();
|
button.fixLayout();
|
||||||
settingsButton = button;
|
settingsButton = button;
|
||||||
|
@ -922,7 +915,6 @@ IDE_Morph.prototype.createControlBar = function () {
|
||||||
button.labelShadowColor = colors[1];
|
button.labelShadowColor = colors[1];
|
||||||
button.labelColor = this.buttonLabelColor;
|
button.labelColor = this.buttonLabelColor;
|
||||||
button.contrast = this.buttonContrast;
|
button.contrast = this.buttonContrast;
|
||||||
button.drawNew();
|
|
||||||
// button.hint = 'cloud operations';
|
// button.hint = 'cloud operations';
|
||||||
button.fixLayout();
|
button.fixLayout();
|
||||||
cloudButton = button;
|
cloudButton = button;
|
||||||
|
@ -975,7 +967,8 @@ IDE_Morph.prototype.createControlBar = function () {
|
||||||
|
|
||||||
this.controlBar.refreshSlider = function () {
|
this.controlBar.refreshSlider = function () {
|
||||||
if (Process.prototype.enableSingleStepping && !myself.isAppMode) {
|
if (Process.prototype.enableSingleStepping && !myself.isAppMode) {
|
||||||
slider.drawNew();
|
slider.fixLayout(); // +++ ??
|
||||||
|
slider.rerender(); // +++ ??
|
||||||
slider.show();
|
slider.show();
|
||||||
} else {
|
} else {
|
||||||
slider.hide();
|
slider.hide();
|
||||||
|
@ -1026,7 +1019,7 @@ IDE_Morph.prototype.createControlBar = function () {
|
||||||
myself.frameColor.darker(myself.buttonContrast)
|
myself.frameColor.darker(myself.buttonContrast)
|
||||||
);
|
);
|
||||||
this.label.color = myself.buttonLabelColor;
|
this.label.color = myself.buttonLabelColor;
|
||||||
this.label.drawNew();
|
this.label.fixLayout();
|
||||||
this.add(this.label);
|
this.add(this.label);
|
||||||
this.label.setCenter(this.center());
|
this.label.setCenter(this.center());
|
||||||
this.label.setLeft(this.settingsButton.right() + padding);
|
this.label.setLeft(this.settingsButton.right() + padding);
|
||||||
|
|
Ładowanie…
Reference in New Issue