Merge branch 'master' into snap8

snap8
Michael 2022-10-31 15:39:32 +01:00
commit c0e4b73c3d
3 zmienionych plików z 20 dodań i 4 usunięć

Wyświetl plik

@ -48,7 +48,7 @@
<script type="text/javascript" src="stitchcode/threads.js?version=2022-10-05"></script>
<script type="text/javascript" src="stitchcode/objects.js?version=2022-10-05"></script>
<script type="text/javascript" src="stitchcode/turtlecloud.js?version=2022-10-05"></script>
<script type="text/javascript" src="stitchcode/gui.js?version=2022-10-05"></script>
<script type="text/javascript" src="stitchcode/gui.js?version=2022-10-31"></script>
<script type="text/javascript" src="stitchcode/store.js?version=2022-06-14"></script>
<script type="text/javascript">

Wyświetl plik

@ -296,6 +296,16 @@ IDE_Morph.prototype.newProject = function () {
SpriteMorph.prototype.useFlatLineEnds = false;
// hide sprite
this.stage.children[0].hide();
this.stage.clearAll();
this.stage.rotateTurtle(this.stage.children[0].heading);
this.createStatusDisplay();
// clear stitch cache now (loading projects sends turtle move commands!)
this.stage.clearAll();
this.stage.turtleShepherd.clear();
this.stage.reRender();
this.setProjectName('');
this.projectNotes = '';
this.createStageHandle();
@ -1634,11 +1644,15 @@ IDE_Morph.prototype.setProjectName = function (string) {
this.origCreator = SnapCloud.username != this.creator ? this.creator : SnapCloud.username;
this.creator = SnapCloud.username ? SnapCloud.username : "anonymous";
this.projectName = string.replace(/['"]/g, '');
this.controlBar.updateLabel();
return name;
};
IDE_Morph.prototype.createSpriteBar = function () {
// assumes that the categories pane has already been created
var rotationStyleButtons = [],
@ -2458,6 +2472,8 @@ IDE_Morph.prototype.createSpriteEditor = function(){
this.originalCreateSpriteEditor();
this.spriteEditor.color = new Color(240, 240, 240);
this.currentSprite.scripts.color = new Color(240, 240, 240);
this.spriteEditor.mouseEnterDragging = nop;
this.spriteEditor.contents.mouseEnterDragging =nop;
};
/* CORRAL BAR */

Wyświetl plik

@ -1223,7 +1223,7 @@ SpriteMorph.prototype.setBrightness = function (num) {
};
SpriteMorph.prototype.changeBrightness = function (delta) {
this.setBrightness(this.getBrightness() + (+delta || 0));
this.setBrightness(this.getBrightness() + (delta || 0));
};
SpriteMorph.prototype.setSaturation = function (num) {
@ -1237,7 +1237,7 @@ SpriteMorph.prototype.getSaturation = function () {
};
SpriteMorph.prototype.changeSaturation= function (delta) {
this.setSaturation(this.getSaturation() + (+delta || 0));
this.setSaturation(this.getSaturation() + (delta || 0));
};
SpriteMorph.prototype.setHSB = function (channel, value) {
@ -1269,7 +1269,7 @@ SpriteMorph.prototype.changeHSB = function (channel, value) {
} else if (channel == 'saturation') {
return this.changeSaturation(value);
} else if (channel == 'brightness') {
return this.changeBrightnes(value);
return this.changeBrightness(value);
}
};