Skip to content

Commit

Permalink
Add Dictionary blocks -WIP (#2585)
Browse files Browse the repository at this point in the history
* add basic dictionary block framework

* update dict icon

* add dictionary block support

* clean up

* set value instead of set key

* add some dict blocks

* new artwork

* add muse-dictionary blocks

* new artwork

* add pitch number and notes played to turtle dictionary

* add note value and current pitch to turtle dictionary

* add dictionary doc

* more dict docs

* deprecate blocks that can be replaced by dictionary get value

* add key2 for JA

* fix i18n typo
  • Loading branch information
walterbender authored Nov 2, 2020
1 parent a287fbb commit b45cc7b
Show file tree
Hide file tree
Showing 19 changed files with 1,041 additions and 22 deletions.
15 changes: 14 additions & 1 deletion documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,20 @@ of the input form are then transferred to *Input-value* block.

The *Push* and *Pop* blocks, found on the *Heap* palette, are used to
store and retrieve values on/from a first-in, last-out (FILO) program
heap.
heap. There is a separate heap maintained for each *Start* block.

![alt tag](https://rawgithub.com/sugarlabs/musicblocks/master/documentation/getDict_block.svg "get value")

![alt tag](https://rawgithub.com/sugarlabs/musicblocks/master/documentation/setDict_block.svg "set value")

The *Get value* and *Set value* blocks are found on the *Dictionary*
palette. They are used to get and set values in a dictionary
object. You can have as many key/value pairs as you'd like in the
dictionary and you can have as many dictionaries as you'd like as
well. There is also a built-in dictionary associated with each *Start*
block that has key/value pairs for parameters such as x, y, heading,
color, shade, grey, pen size, notes played, current pitch, pitch
number, and note value.

![alt tag](https://rawgithub.com/sugarlabs/musicblocks/master/documentation/print_block.svg "print")

Expand Down
73 changes: 73 additions & 0 deletions documentation/dictionary_block.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions documentation/getDict2_block.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 85 additions & 0 deletions documentation/getDict_block.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
97 changes: 97 additions & 0 deletions documentation/setDict2_block.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b45cc7b

Please sign in to comment.