From be3c222c62b6c452831bd5703309b7324b18ad67 Mon Sep 17 00:00:00 2001 From: roboticafacil Date: Sat, 16 Dec 2017 11:44:16 +0100 Subject: [PATCH 1/2] new file: img/blocks/round_led_strip.svg --- img/blocks/round_led_strip.svg | 242 +++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 img/blocks/round_led_strip.svg diff --git a/img/blocks/round_led_strip.svg b/img/blocks/round_led_strip.svg new file mode 100644 index 0000000..cbd91e1 --- /dev/null +++ b/img/blocks/round_led_strip.svg @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 0a23390b93711e4765b4f7c09c8fed29ae851ed3 Mon Sep 17 00:00:00 2001 From: roboticafacil Date: Sat, 16 Dec 2017 11:46:18 +0100 Subject: [PATCH 2/2] modified: lang/SimpleExpressions.json modified: simpleExpression_blocks.js --- lang/SimpleExpressions.json | 1 + simpleExpression_blocks.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lang/SimpleExpressions.json b/lang/SimpleExpressions.json index b3b2f30..32d9ffe 100644 --- a/lang/SimpleExpressions.json +++ b/lang/SimpleExpressions.json @@ -9,6 +9,7 @@ "LANG_SUBCATEGORY_BUZZER": "Buzzer", "LANG_PIEZO_BUZZER": "Buzzer", "LANG_PIEZO_BUZZER_PIN": "PIN", + "LANG_SIMPLEEXPRESSIONS_SHOW_MOUTH": "7-RGB LEDs", "LANG_PIEZO_BUZZER_PREDEF_SOUNDS_TOOLTIP": "Plays some basic sounds based on SimpleExpressions library" } } diff --git a/simpleExpression_blocks.js b/simpleExpression_blocks.js index 5d56a6d..df4cc3c 100644 --- a/simpleExpression_blocks.js +++ b/simpleExpression_blocks.js @@ -25,7 +25,7 @@ Blockly.Blocks['show_mouth'] = { tags: [], examples: [], init: function() { - this.appendDummyInput('').appendField("WS2812 7-Ring").appendField(new Blockly.FieldImage('img/blocks/led_strip.svg', 40*options.zoom, 40*options.zoom)); + this.appendDummyInput('').appendField(Facilino.locales.getKey('LANG_SIMPLEEXPRESSIONS_SHOW_MOUTH')).appendField(new Blockly.FieldImage('img/blocks/round_led_strip.svg', 40*options.zoom, 40*options.zoom)); this.appendValueInput('PIN').appendField(Facilino.locales.getKey('LANG_SIMPLEEXPRESSIONS_PIN')).setAlign(Blockly.ALIGN_RIGHT).setCheck(Number); this.appendDummyInput('').appendField('Expression').appendField(new Blockly.FieldDropdown([['Zeros','zeros'],['Happy Small','happySmall'],['Happy Full','happyFull'],['Sad Small','sadSmall'],['Sad Full','sadFull'],['Neutral','neutral'],['Circle','circle'],['Center','center'],['Hook','hook'],['Upsidedown Hook','upsidedownhook'],['Kooh','kooh'],['Upsidedown Kooh','upsidedownkooh'],['Cross','cross'],['Rect','rect'],['Left Arrow','leftarrow'],['Right Arrow','rightarrow'],['Left Half','lefthalf'],['Right Half','righthalf']]),'EXPRESSION').setAlign(Blockly.ALIGN_RIGHT); var colour = new Blockly.FieldColour('#000000');