kopia lustrzana https://github.com/backface/turtlestitch
added "rotation style" selectors to accessor blocks
rodzic
5b7d215cc9
commit
91009916a2
|
@ -623,8 +623,8 @@ SyntaxElementMorph.prototype.getVarNamesDict = function () {
|
||||||
'parent' : ['parent'],
|
'parent' : ['parent'],
|
||||||
// 'temporary?' : ['temporary?'],
|
// 'temporary?' : ['temporary?'],
|
||||||
'dangling?' : ['dangling?'],
|
'dangling?' : ['dangling?'],
|
||||||
'draggable?' : ['draggable?'], // +++
|
'draggable?' : ['draggable?'],
|
||||||
'rotation style' : ['rotation style'], // +++
|
'rotation style' : ['rotation style'],
|
||||||
'rotation x' : ['rotation x'],
|
'rotation x' : ['rotation x'],
|
||||||
'rotation y' : ['rotation y']
|
'rotation y' : ['rotation y']
|
||||||
};
|
};
|
||||||
|
@ -8757,8 +8757,8 @@ InputSlotMorph.prototype.gettablesMenu = function () {
|
||||||
dict.costumes = ['costumes'];
|
dict.costumes = ['costumes'];
|
||||||
dict.sounds = ['sounds'];
|
dict.sounds = ['sounds'];
|
||||||
dict['dangling?'] = ['dangling?'];
|
dict['dangling?'] = ['dangling?'];
|
||||||
dict['draggable?'] = ['draggable?']; // +++
|
dict['draggable?'] = ['draggable?'];
|
||||||
dict['rotation style'] = ['rotation style']; // +++
|
dict['rotation style'] = ['rotation style'];
|
||||||
dict['rotation x'] = ['rotation x'];
|
dict['rotation x'] = ['rotation x'];
|
||||||
dict['rotation y'] = ['rotation y'];
|
dict['rotation y'] = ['rotation y'];
|
||||||
dict['center x'] = ['center x'];
|
dict['center x'] = ['center x'];
|
||||||
|
|
|
@ -3585,7 +3585,9 @@ Process.prototype.reportGet = function (query) {
|
||||||
case 'dangling?':
|
case 'dangling?':
|
||||||
return !thisObj.rotatesWithAnchor;
|
return !thisObj.rotatesWithAnchor;
|
||||||
case 'draggable?':
|
case 'draggable?':
|
||||||
return thisObj.isDraggable; // +++
|
return thisObj.isDraggable;
|
||||||
|
case 'rotation style':
|
||||||
|
return thisObj.rotationStyle || 0;
|
||||||
case 'rotation x':
|
case 'rotation x':
|
||||||
return thisObj.xPosition();
|
return thisObj.xPosition();
|
||||||
case 'rotation y':
|
case 'rotation y':
|
||||||
|
@ -3697,6 +3699,28 @@ Process.prototype.doSet = function (attribute, value) {
|
||||||
}
|
}
|
||||||
rcvr.version = Date.now();
|
rcvr.version = Date.now();
|
||||||
break;
|
break;
|
||||||
|
case 'rotation style':
|
||||||
|
this.assertType(rcvr, 'sprite');
|
||||||
|
this.assertType(+value, 'number');
|
||||||
|
if (!contains([0, 1, 2], +value)) {
|
||||||
|
return; // maybe throw an error msg
|
||||||
|
}
|
||||||
|
rcvr.rotationStyle = +value;
|
||||||
|
// redraw sprite:
|
||||||
|
rcvr.changed();
|
||||||
|
rcvr.drawNew();
|
||||||
|
rcvr.changed();
|
||||||
|
// update padlock symbol in the IDE:
|
||||||
|
ide = rcvr.parentThatIsA(IDE_Morph);
|
||||||
|
if (ide) {
|
||||||
|
ide.spriteBar.children.forEach(function (each) {
|
||||||
|
if (each.refresh) {
|
||||||
|
each.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
rcvr.version = Date.now();
|
||||||
|
break;
|
||||||
case 'rotation x':
|
case 'rotation x':
|
||||||
this.assertType(rcvr, 'sprite');
|
this.assertType(rcvr, 'sprite');
|
||||||
this.assertType(value, 'number');
|
this.assertType(value, 'number');
|
||||||
|
|
Ładowanie…
Reference in New Issue