mirror of
https://github.com/ocogeclub/ocoge.git
synced 2024-11-21 23:29:48 +00:00
updated spawn block
This commit is contained in:
parent
7abefa0954
commit
b12cdc679c
@ -751,7 +751,7 @@
|
|||||||
<block type="aquestalk_pi">
|
<block type="aquestalk_pi">
|
||||||
<value name="talk">
|
<value name="talk">
|
||||||
<shadow type="text">
|
<shadow type="text">
|
||||||
<field name="TEXT">こんにちは</field>
|
<field name="TEXT">おはようございます。</field>
|
||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
|
@ -1923,6 +1923,7 @@ Blockly.Blocks['ugj_spawn'] = {
|
|||||||
.setCheck(null);
|
.setCheck(null);
|
||||||
this.setInputsInline(true);
|
this.setInputsInline(true);
|
||||||
this.setPreviousStatement(true, null);
|
this.setPreviousStatement(true, null);
|
||||||
|
this.setNextStatement(true, null);
|
||||||
this.setStyle('special_blocks')
|
this.setStyle('special_blocks')
|
||||||
this.setTooltip("外部プログラムを実行して子プロセスを生成します。データを受け取る毎にステートメントが実行されます。");
|
this.setTooltip("外部プログラムを実行して子プロセスを生成します。データを受け取る毎にステートメントが実行されます。");
|
||||||
this.setHelpUrl("");
|
this.setHelpUrl("");
|
||||||
@ -1984,7 +1985,7 @@ Blockly.Blocks['aquestalk_pi'] = {
|
|||||||
};
|
};
|
||||||
Blockly.JavaScript['aquestalk_pi'] = function (block) {
|
Blockly.JavaScript['aquestalk_pi'] = function (block) {
|
||||||
var value_talk = Blockly.JavaScript.valueToCode(block, 'talk', Blockly.JavaScript.ORDER_ATOMIC);
|
var value_talk = Blockly.JavaScript.valueToCode(block, 'talk', Blockly.JavaScript.ORDER_ATOMIC);
|
||||||
var code = `'./bin/aquestalkpi/AquesTalkPi ' + ${value_talk} + ' | aplay', { shell: true }`;
|
var code = `'./bin/aquestalkpi/AquesTalkPi -g 50 ' + ${value_talk} + ' | aplay', { shell: true }`;
|
||||||
return [code, Blockly.JavaScript.ORDER_NONE];
|
return [code, Blockly.JavaScript.ORDER_NONE];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user