Allow two-item lists as arguments for "point towards" and "go to" primitives

upd4.1
Jens Mönig 2017-07-27 16:20:37 +02:00
rodzic 4ef3b64aa4
commit 745d833e64
2 zmienionych plików z 16 dodań i 0 usunięć

Wyświetl plik

@ -3557,6 +3557,7 @@ Fixes:
* Objects: don't shadow costume # when editing a costume
* Blocks, Objects: remodelled context menu for inheritance to use check-boxes
* Blocks, Objects, Threads: fold two "stop" commands into one
* Objects: Allow two-item lists as arguments for "point towards" and "go to" primitives
Features:
@ -3579,6 +3580,7 @@ Features:
* Assert data types to list operations for more meaningful error messages
* programmatically hide and show primitives in the palette
* new "pen trails" reporter primitive and stage context menu entry
* two-item lists as x-y coordinate arguments for "point towards" and "go to" primitives
Fixes:
* changed keyboard shortcut indicator for “find blocks” to “^”

Wyświetl plik

@ -2813,6 +2813,13 @@ Process.prototype.doFaceTowards = function (name) {
if (this.inputOption(name) === 'mouse-pointer') {
thisObj.faceToXY(this.reportMouseX(), this.reportMouseY());
} else {
if (name instanceof List) {
thisObj.faceToXY(
name.at(1),
name.at(2)
);
return;
}
thatObj = this.getOtherObject(name, this.homeContext.receiver);
if (thatObj) {
thisObj.faceToXY(
@ -2832,6 +2839,13 @@ Process.prototype.doGotoObject = function (name) {
if (this.inputOption(name) === 'mouse-pointer') {
thisObj.gotoXY(this.reportMouseX(), this.reportMouseY());
} else {
if (name instanceof List) {
thisObj.gotoXY(
name.at(1),
name.at(2)
);
return;
}
thatObj = this.getOtherObject(name, this.homeContext.receiver);
if (thatObj) {
thisObj.gotoXY(