mirror of
https://github.com/scratchfoundation/scratch-flash.git
synced 2024-12-04 21:21:06 -05:00
Now fixing up stopScripts blocks
This commit is contained in:
parent
f651a90556
commit
909d541ee9
2 changed files with 8 additions and 4 deletions
|
@ -465,8 +465,10 @@ public class Block extends Sprite {
|
|||
} else {
|
||||
dup.copyArgs(args);
|
||||
if (op == 'stopScripts' && args[0] is BlockArg) {
|
||||
if (forStage && args[0].argValue == 'other scripts in sprite') dup.args[0].setArgValue('other scripts in stage');
|
||||
if (!forStage && args[0].argValue == 'other scripts in stage') dup.args[0].setArgValue('other scripts in sprite');
|
||||
if(args[0].argValue.indexOf('other scripts') == 0) {
|
||||
if (forStage) dup.args[0].setArgValue('other scripts in stage');
|
||||
else dup.args[0].setArgValue('other scripts in sprite');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nextBlock != null) dup.addChild(dup.nextBlock = nextBlock.duplicate(forClone, forStage));
|
||||
|
|
|
@ -228,8 +228,10 @@ public class BlockIO {
|
|||
case 'stopScripts':
|
||||
var type:String = (cmd[1].indexOf('other scripts') == 0) ? ' ' : 'f'; // block type depends on menu arg
|
||||
b = new Block('stop %m.stop', type, controlColor, 'stopScripts');
|
||||
if (forStage && b.op == 'stopScripts' && cmd[1] == 'other scripts in sprite') cmd[1] = 'other scripts in stage';
|
||||
if (!forStage && b.op == 'stopScripts' && cmd[1] == 'other scripts in stage') cmd[1] = 'other scripts in sprite';
|
||||
if (type == ' ') {
|
||||
if(forStage) cmd[1] = 'other scripts in stage';
|
||||
else cmd[1] = 'other scripts in sprite';
|
||||
}
|
||||
b.setArg(0, cmd[1]);
|
||||
return b;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue