Add shadow blocks and category colours to code demo.

This commit is contained in:
Neil Fraser
2015-10-12 21:00:29 -07:00
parent 59cadcb2d7
commit b503dd7d80
4 changed files with 166 additions and 76 deletions

View File

@@ -70,7 +70,7 @@
<textarea id="content_xml" class="content" wrap="off"></textarea>
<xml id="toolbox" style="display: none">
<category id="catLogic">
<category id="catLogic" colour="210">
<block type="controls_if"></block>
<block type="logic_compare"></block>
<block type="logic_operation"></block>
@@ -79,128 +79,216 @@
<block type="logic_null"></block>
<block type="logic_ternary"></block>
</category>
<category id="catLoops">
<category id="catLoops" colour="120">
<block type="controls_repeat_ext">
<value name="TIMES">
<block type="math_number">
<shadow type="math_number">
<field name="NUM">10</field>
</block>
</shadow>
</value>
</block>
<block type="controls_whileUntil"></block>
<block type="controls_for">
<value name="FROM">
<block type="math_number">
<shadow type="math_number">
<field name="NUM">1</field>
</block>
</shadow>
</value>
<value name="TO">
<block type="math_number">
<shadow type="math_number">
<field name="NUM">10</field>
</block>
</shadow>
</value>
<value name="BY">
<block type="math_number">
<shadow type="math_number">
<field name="NUM">1</field>
</block>
</shadow>
</value>
</block>
<block type="controls_forEach"></block>
<block type="controls_flow_statements"></block>
</category>
<category id="catMath">
<category id="catMath" colour="230">
<block type="math_number"></block>
<block type="math_arithmetic"></block>
<block type="math_single"></block>
<block type="math_trig"></block>
<block type="math_constant"></block>
<block type="math_number_property"></block>
<block type="math_change">
<value name="DELTA">
<block type="math_number">
<block type="math_arithmetic">
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</block>
</shadow>
</value>
<value name="B">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
</value>
</block>
<block type="math_round"></block>
<block type="math_on_list"></block>
<block type="math_modulo"></block>
<block type="math_constrain">
<value name="LOW">
<block type="math_number">
<block type="math_single">
<value name="NUM">
<shadow type="math_number">
<field name="NUM">9</field>
</shadow>
</value>
</block>
<block type="math_trig">
<value name="NUM">
<shadow type="math_number">
<field name="NUM">45</field>
</shadow>
</value>
</block>
<block type="math_constant"></block>
<block type="math_number_property">
<value name="NUMBER_TO_CHECK">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
</block>
<block type="math_change">
<value name="DELTA">
<shadow type="math_number">
<field name="NUM">1</field>
</block>
</shadow>
</value>
</block>
<block type="math_round">
<value name="NUM">
<shadow type="math_number">
<field name="NUM">3.1</field>
</shadow>
</value>
</block>
<block type="math_on_list"></block>
<block type="math_modulo">
<value name="DIVIDEND">
<shadow type="math_number">
<field name="NUM">64</field>
</shadow>
</value>
<value name="DIVISOR">
<shadow type="math_number">
<field name="NUM">10</field>
</shadow>
</value>
</block>
<block type="math_constrain">
<value name="VALUE">
<shadow type="math_number">
<field name="NUM">50</field>
</shadow>
</value>
<value name="LOW">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
</value>
<value name="HIGH">
<block type="math_number">
<shadow type="math_number">
<field name="NUM">100</field>
</block>
</shadow>
</value>
</block>
<block type="math_random_int">
<value name="FROM">
<block type="math_number">
<shadow type="math_number">
<field name="NUM">1</field>
</block>
</shadow>
</value>
<value name="TO">
<block type="math_number">
<shadow type="math_number">
<field name="NUM">100</field>
</block>
</shadow>
</value>
</block>
<block type="math_random_float"></block>
</category>
<category id="catText">
<category id="catText" colour="160">
<block type="text"></block>
<block type="text_join"></block>
<block type="text_append">
<value name="TEXT">
<block type="text"></block>
<shadow type="text"></shadow>
</value>
</block>
<block type="text_length">
<value name="VALUE">
<shadow type="text">
<field name="TEXT">abc</field>
</shadow>
</value>
</block>
<block type="text_isEmpty">
<value name="VALUE">
<shadow type="text">
<field name="TEXT"></field>
</shadow>
</value>
</block>
<block type="text_length"></block>
<block type="text_isEmpty"></block>
<block type="text_indexOf">
<value name="VALUE">
<block type="variables_get">
<field name="VAR" class="textVar">...</field>
<field name="VAR">text</field>
</block>
</value>
<value name="FIND">
<shadow type="text">
<field name="TEXT">abc</field>
</shadow>
</value>
</block>
<block type="text_charAt">
<value name="VALUE">
<block type="variables_get">
<field name="VAR" class="textVar">...</field>
<field name="VAR">text</field>
</block>
</value>
</block>
<block type="text_getSubstring">
<value name="STRING">
<block type="variables_get">
<field name="VAR" class="textVar">...</field>
<field name="VAR">text</field>
</block>
</value>
</block>
<block type="text_changeCase"></block>
<block type="text_trim"></block>
<block type="text_print"></block>
<block type="text_changeCase">
<value name="TEXT">
<shadow type="text">
<field name="TEXT">abc</field>
</shadow>
</value>
</block>
<block type="text_trim">
<value name="TEXT">
<shadow type="text">
<field name="TEXT">abc</field>
</shadow>
</value>
</block>
<block type="text_print">
<value name="TEXT">
<shadow type="text">
<field name="TEXT">abc</field>
</shadow>
</value>
</block>
<block type="text_prompt_ext">
<value name="TEXT">
<block type="text"></block>
<shadow type="text">
<field name="TEXT">abc</field>
</shadow>
</value>
</block>
</category>
<category id="catLists">
<category id="catLists" colour="260">
<block type="lists_create_with">
<mutation items="0"></mutation>
</block>
<block type="lists_create_with"></block>
<block type="lists_repeat">
<value name="NUM">
<block type="math_number">
<shadow type="math_number">
<field name="NUM">5</field>
</block>
</shadow>
</value>
</block>
<block type="lists_length"></block>
@@ -208,80 +296,80 @@
<block type="lists_indexOf">
<value name="VALUE">
<block type="variables_get">
<field name="VAR" class="listVar">...</field>
<field name="VAR">list</field>
</block>
</value>
</block>
<block type="lists_getIndex">
<value name="VALUE">
<block type="variables_get">
<field name="VAR" class="listVar">...</field>
<field name="VAR">list</field>
</block>
</value>
</block>
<block type="lists_setIndex">
<value name="LIST">
<block type="variables_get">
<field name="VAR" class="listVar">...</field>
<field name="VAR">list</field>
</block>
</value>
</block>
<block type="lists_getSublist">
<value name="LIST">
<block type="variables_get">
<field name="VAR" class="listVar">...</field>
<field name="VAR">list</field>
</block>
</value>
</block>
<block type="lists_split">
<value name="DELIM">
<block type="text">
<shadow type="text">
<field name="TEXT">,</field>
</block>
</shadow>
</value>
</block>
</category>
<category id="catColour">
<category id="catColour" colour="20">
<block type="colour_picker"></block>
<block type="colour_random"></block>
<block type="colour_rgb">
<value name="RED">
<block type="math_number">
<shadow type="math_number">
<field name="NUM">100</field>
</block>
</shadow>
</value>
<value name="GREEN">
<block type="math_number">
<shadow type="math_number">
<field name="NUM">50</field>
</block>
</shadow>
</value>
<value name="BLUE">
<block type="math_number">
<shadow type="math_number">
<field name="NUM">0</field>
</block>
</shadow>
</value>
</block>
<block type="colour_blend">
<value name="COLOUR1">
<block type="colour_picker">
<shadow type="colour_picker">
<field name="COLOUR">#ff0000</field>
</block>
</shadow>
</value>
<value name="COLOUR2">
<block type="colour_picker">
<shadow type="colour_picker">
<field name="COLOUR">#3333ff</field>
</block>
</shadow>
</value>
<value name="RATIO">
<block type="math_number">
<shadow type="math_number">
<field name="NUM">0.5</field>
</block>
</shadow>
</value>
</block>
</category>
<sep></sep>
<category id="catVariables" custom="VARIABLE"></category>
<category id="catFunctions" custom="PROCEDURE"></category>
<category id="catVariables" colour="330" custom="VARIABLE"></category>
<category id="catFunctions" colour="290" custom="PROCEDURE"></category>
</xml>
</body>