Skip to content

Commit

Permalink
update(heart): new tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
CarolineNakazato authored Dec 7, 2023
1 parent a8088d0 commit 596521d
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 10 deletions.
Binary file added health/heart/tutorial/tutorial3/1n.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added health/heart/tutorial/tutorial3/1star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added health/heart/tutorial/tutorial3/1t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added health/heart/tutorial/tutorial3/2n.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added health/heart/tutorial/tutorial3/2star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added health/heart/tutorial/tutorial3/2t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added health/heart/tutorial/tutorial3/3n.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added health/heart/tutorial/tutorial3/3star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added health/heart/tutorial/tutorial3/3t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 61 additions & 10 deletions health/heart/tutorial/tutorial3/blocks.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
Blockly.Blocks['numero'] = {
init: function () {
this.jsonInit({
message0: '%1',
args0: [
{
type: 'field_dropdown',
name: 'entity',
options: [
[{src: '1n.png', width: 200, height: 200, alt: 'imagem 1'}, 'imagem1'],
[{src: '2n.png', width: 200, height: 200, alt: 'imagem 2'}, 'imagem2'],
[{src: '3n.png', width: 200, height: 200, alt: 'imagem 3'}, 'imagem3']
]
}
],
colour: 20,
tooltip: 'num',
output: 'numero'
})
}
}

Blockly.Blocks['imagem'] = {
init: function () {
this.jsonInit({
Expand All @@ -7,47 +29,76 @@ Blockly.Blocks['imagem'] = {
type: 'field_dropdown',
name: 'entity',
options: [
[{src: 'imagem1.png', width: 200, height: 200, alt: 'imagem 1'}, 'imagem1'],
[{src: 'imagem2.png', width: 200, height: 200, alt: 'imagem 2'}, 'imagem2']
[{src: '1star.png', width: 200, height: 200, alt: 'imagem 1'}, 'imagem1'],
[{src: '2star.png', width: 200, height: 200, alt: 'imagem 2'}, 'imagem2'],
[{src: '3star.png', width: 200, height: 200, alt: 'imagem 3'}, 'imagem3']
]
}
],
message1: 'Numero da imagem: %1',
message1: 'Cor da estrela: %1',
args1: [
{
type: 'field_dropdown',
name: 'entity',
options: [
['UM', 'img1'],
['Dois', 'img2']
['Amarelo', 'img1'],
['Vermelho', 'img2'],
['Azul', 'img2']
]
}
],
colour: 80,
colour: 40,
tooltip: 'Img',
output: 'imagens'
})
}
}


Blockly.Blocks['texto'] = {
init: function () {
this.jsonInit({
message0: '%1',
args0: [
{
type: 'field_dropdown',
name: 'entity',
options: [
[{src: '1t.png', width: 200, height: 200, alt: 'imagem 1'}, 'imagem1'],
[{src: '2t.png', width: 200, height: 200, alt: 'imagem 2'}, 'imagem2'],
[{src: '3t.png', width: 200, height: 200, alt: 'imagem 3'}, 'imagem3']
]
}
],
colour: 80,
tooltip: 'txt',
output: 'texto'
})
}
}
Blockly.Blocks['sequence'] = {
init: function () {
this.jsonInit({
message0: '%1 Imagem %2 Imagem ',
message0: '%1 Número %2 Estrela %3 Texto',
args0: [
{
type: 'input_value',
name: 'VAR',
check: 'imagens',
check: 'numero',
},
{
type: 'input_value',
name: 'VAR',
check: 'imagens',
},
{
type: 'input_value',
name: 'VAR',
check: 'texto',
}
],
colour: 500
colour: 500,
nextStatement: null,
previousStatement: null
})
}
}
2 changes: 2 additions & 0 deletions health/heart/tutorial/tutorial3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
<xml id="toolbox" style="display: none">

<category name="Componentes" colour="20">
<block type="numero"></block>
<block type="imagem"></block>
<block type="texto"></block>
<block type="sequence"></block>
</category>
</xml>
Expand Down

0 comments on commit 596521d

Please sign in to comment.