Skip to content

Commit

Permalink
updated the text costumes library with a special case for a space cha…
Browse files Browse the repository at this point in the history
…racter
  • Loading branch information
jmoenig committed Oct 22, 2024
1 parent b8181d9 commit 8d3edbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## in development:

### 2024-10-22
* updated the text costumes library with a special case for a space character

## 10.1.7:
* **Notable Fixes:**
* fixed a BlockSymbolMorph getRenderColor() null case glitch
Expand Down
2 changes: 1 addition & 1 deletion libraries/textCostumes_module.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<blocks app="Snap! 10, https://snap.berkeley.edu" version="2"><block-definition s="costume from text %&apos;text&apos; size %&apos;size&apos;" type="reporter" category="looks"><header></header><code></code><translations>de:Kostüm aus Text _ Größe _&#xD;pt:um traje com o texto _ de tamanho _&#xD;ca:vestit amb el text _ i mida _&#xD;pl:kostium z tekstu _ rozmiar _&#xD;</translations><inputs><input type="%s">A</input><input type="%n">72</input></inputs><script><block s="doDeclareVariables"><list><l>costume</l><l>x</l><l>y</l><l>dir</l><l>cst</l><l>trails</l><l>pen state</l></list></block><block s="doSetVar"><l>x</l><block s="xPosition"></block></block><block s="doSetVar"><l>y</l><block s="yPosition"></block></block><block s="doSetVar"><l>dir</l><block s="direction"></block></block><block s="doSetVar"><l>cst</l><block s="reportGet"><l><option>costume</option></l></block></block><block s="doSetVar"><l>pen state</l><block s="getPenDown"></block></block><block s="up"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="setHeading"><l>90</l></block><block s="doSwitchToCostume"><l><option>Turtle</option></l></block><block s="doSetVar"><l>trails</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="gotoXY"><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><l>0</l></block><block s="write"><block var="text"/><block var="size"/></block><block s="gotoXY"><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><l>0</l></block><block s="doSetVar"><l>costume</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="doApplyExtension"><l>obj_name(obj, name)</l><list><block var="costume"/><block s="reportJoinWords"><list><block var="text"/></list></block></list></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSwitchToCostume"><block var="trails"/></block><block s="doStamp"></block><block s="doSwitchToCostume"><block var="cst"/></block><block s="gotoXY"><block var="x"/><block var="y"/></block><block s="setHeading"><block var="dir"/></block><block s="doIf"><block var="pen state"/><script><block s="down"></block></script><list></list></block><block s="doReport"><block var="costume"/></block></script></block-definition><block-definition s="costume %&apos;cst&apos; with background RGBA %&apos;rgb&apos; padding %&apos;padding&apos;" type="reporter" category="looks"><header></header><code></code><translations>pl:kostium _ z tłem RGBA _ rozmiar tła _&#xD;</translations><inputs><input type="%s" readonly="true"><options>§_costumesMenu</options></input><input type="%n">200</input><input type="%n">2</input></inputs><script><block s="doDeclareVariables"><list><l>old</l><l>clr</l><l>new</l><l>x</l><l>y</l><l>dir</l><l>trails</l><l>flat</l><l>old size</l><l>old pen state</l></list></block><block s="doSetVar"><l>x</l><block s="xPosition"></block></block><block s="doSetVar"><l>y</l><block s="yPosition"></block></block><block s="doSetVar"><l>dir</l><block s="direction"></block></block><block s="doSetVar"><l>old</l><block s="reportGet"><l><option>costume</option></l></block></block><block s="doSetVar"><l>clr</l><block s="getPenAttribute"><l><option>r-g-b-a</option></l></block></block><block s="doSetVar"><l>flat</l><block s="reportGlobalFlag"><l><option>flat line ends</option></l></block></block><block s="doSetVar"><l>old size</l><block s="getPenAttribute"><l><option>size</option></l></block></block><block s="doSetVar"><l>old pen state</l><block s="getPenDown"></block></block><block s="up"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSetVar"><l>trails</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="gotoXY"><block s="reportMonadic"><l><option>neg</option></l><block s="reportVariadicSum"><list><block s="reportQuotient"><block s="reportGetImageAttribute"><l><option>width</option></l><block var="cst"/></block><l>2</l></block><block var="padding"/></list></block></block><l>0</l></block><block s="setHeading"><l>90</l></block><block s="doSetGlobalFlag"><l><option>flat line ends</option></l><l><bool>true</bool></l></block><block s="setSize"><block s="reportVariadicSum"><list><block s="reportGetImageAttribute"><l><option>height</option></l><block var="cst"/></block><block s="reportVariadicProduct"><list><block var="padding"/><l>2</l></list></block></list></block></block><block s="setPenColorDimension"><l><option>r-g-b(-a)</option></l><block var="rgb"/></block><block s="down"></block><block s="setXPosition"><block s="reportMonadic"><l><option>neg</option></l><block s="xPosition"></block></block></block><block s="up"></block><block s="doSwitchToCostume"><block var="cst"/></block><block s="doGotoObject"><l><option>center</option></l></block><block s="gotoXY"><block s="reportMonadic"><l><option>neg</option></l><block s="reportGet"><l><option>center x</option></l></block></block><block s="reportMonadic"><l><option>neg</option></l><block s="reportGet"><l><option>center y</option></l></block></block></block><block s="doStamp"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSetVar"><l>new</l><block s="reportPenTrailsAsCostume"></block></block><block s="doApplyExtension"><l>obj_name(obj, name)</l><list><block var="new"/><block s="reportIfElse"><block s="reportListContainsItem"><block s="reportTextSplit"><block s="reportAttributeOf"><l><option>costume name</option></l><l>Sprite</l></block><l><option>word</option></l></block><l>button</l></block><block s="reportAttributeOf"><l><option>costume name</option></l><l>Sprite</l></block><block s="reportJoinWords"><list><block s="reportAttributeOf"><l><option>costume name</option></l><l>Sprite</l></block><l> button</l></list></block></block></list></block><block s="clear"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSwitchToCostume"><block var="trails"/></block><block s="doStamp"></block><block s="doSwitchToCostume"><block var="old"/></block><block s="gotoXY"><block var="x"/><block var="y"/></block><block s="setHeading"><block var="dir"/></block><block s="setPenColorDimension"><l><option>r-g-b(-a)</option></l><block var="clr"/></block><block s="doSetGlobalFlag"><l><option>flat line ends</option></l><block var="flat"/></block><block s="setSize"><block var="old size"/></block><block s="doIf"><block var="old pen state"/><script><block s="down"></block></script><list></list></block><block s="doReport"><block var="new"/></block></script><scripts><script x="255" y="186.19999999999993"><custom-block s="costume %s with background RGBA %n padding %n"><custom-block s="costume %s with background RGBA %n padding %n"><custom-block s="costume from text %s size %n"><l>Snap!</l><l>36</l></custom-block><l>200</l><l>10</l></custom-block><l>100</l><l>2</l></custom-block></script><comment x="248.685546875" y="121.03333333333336" w="106" collapsed="false">Use this block to make &quot;clickable&quot; buttons:</comment></scripts></block-definition></blocks>
<blocks app="Snap! 10.1-dev, https://snap.berkeley.edu" version="2"><block-definition s="costume from text %&apos;text&apos; size %&apos;size&apos;" type="reporter" category="looks"><header></header><code></code><translations>de:Kostüm aus Text _ Größe _&#xD;pt:um traje com o texto _ de tamanho _&#xD;ca:vestit amb el text _ i mida _&#xD;</translations><inputs><input type="%s">A</input><input type="%n">72</input></inputs><script><block s="doDeclareVariables"><list><l>costume</l><l>x</l><l>y</l><l>dir</l><l>cst</l><l>tmp</l><l>trails</l><l>pen state</l></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block var="text"/><l> </l></list></block><script><block s="doSetVar"><l>tmp</l><custom-block s="costume from text %s size %n"><l>A</l><block var="size"/></custom-block></block><block s="doReport"><block s="reportNewCostume"><block s="reportReshape"><l>0</l><block s="reportListAttribute"><l><option>dimensions</option></l><block s="reportGetImageAttribute"><l><option>pixels</option></l><block var="tmp"/></block></block></block><block s="reportGetImageAttribute"><l><option>width</option></l><block var="tmp"/></block><block s="reportGetImageAttribute"><l><option>height</option></l><block var="tmp"/></block></block></block></script><list></list></block><block s="doSetVar"><l>x</l><block s="xPosition"></block></block><block s="doSetVar"><l>y</l><block s="yPosition"></block></block><block s="doSetVar"><l>dir</l><block s="direction"></block></block><block s="doSetVar"><l>cst</l><block s="reportGet"><l><option>costume</option></l></block></block><block s="doSetVar"><l>pen state</l><block s="getPenDown"></block></block><block s="up"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="setHeading"><l>90</l></block><block s="doSwitchToCostume"><l><option>Turtle</option></l></block><block s="doSetVar"><l>trails</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="gotoXY"><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><l>0</l></block><block s="write"><block var="text"/><block var="size"/></block><block s="gotoXY"><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><l>0</l></block><block s="doSetVar"><l>costume</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="doApplyExtension"><l>obj_name(obj, name)</l><list><block var="costume"/><block s="reportJoinWords"><list><block var="text"/></list></block></list></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSwitchToCostume"><block var="trails"/></block><block s="doStamp"></block><block s="doSwitchToCostume"><block var="cst"/></block><block s="gotoXY"><block var="x"/><block var="y"/></block><block s="setHeading"><block var="dir"/></block><block s="doIf"><block var="pen state"/><script><block s="down"></block></script><list></list></block><block s="doReport"><block var="costume"/></block></script></block-definition><block-definition s="costume %&apos;cst&apos; with background RGBA %&apos;rgb&apos; padding %&apos;padding&apos;" type="reporter" category="looks"><header></header><code></code><translations>pl:kostium _ z tłem RGBA _ rozmiar tła _&#xD;</translations><inputs><input type="%s" readonly="true"><options>§_costumesMenu</options></input><input type="%n">200</input><input type="%n">2</input></inputs><script><block s="doDeclareVariables"><list><l>old</l><l>clr</l><l>new</l><l>x</l><l>y</l><l>dir</l><l>trails</l><l>flat</l><l>old size</l><l>old pen state</l></list></block><block s="doSetVar"><l>x</l><block s="xPosition"></block></block><block s="doSetVar"><l>y</l><block s="yPosition"></block></block><block s="doSetVar"><l>dir</l><block s="direction"></block></block><block s="doSetVar"><l>old</l><block s="reportGet"><l><option>costume</option></l></block></block><block s="doSetVar"><l>clr</l><block s="getPenAttribute"><l><option>r-g-b-a</option></l></block></block><block s="doSetVar"><l>flat</l><block s="reportGlobalFlag"><l><option>flat line ends</option></l></block></block><block s="doSetVar"><l>old size</l><block s="getPenAttribute"><l><option>size</option></l></block></block><block s="doSetVar"><l>old pen state</l><block s="getPenDown"></block></block><block s="up"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSetVar"><l>trails</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="gotoXY"><block s="reportMonadic"><l><option>neg</option></l><block s="reportVariadicSum"><list><block s="reportQuotient"><block s="reportGetImageAttribute"><l><option>width</option></l><block var="cst"/></block><l>2</l></block><block var="padding"/></list></block></block><l>0</l></block><block s="setHeading"><l>90</l></block><block s="doSetGlobalFlag"><l><option>flat line ends</option></l><l><bool>true</bool></l></block><block s="setSize"><block s="reportVariadicSum"><list><block s="reportGetImageAttribute"><l><option>height</option></l><block var="cst"/></block><block s="reportVariadicProduct"><list><block var="padding"/><l>2</l></list></block></list></block></block><block s="setPenColorDimension"><l><option>r-g-b(-a)</option></l><block var="rgb"/></block><block s="down"></block><block s="setXPosition"><block s="reportMonadic"><l><option>neg</option></l><block s="xPosition"></block></block></block><block s="up"></block><block s="doSwitchToCostume"><block var="cst"/></block><block s="doGotoObject"><l><option>center</option></l></block><block s="gotoXY"><block s="reportMonadic"><l><option>neg</option></l><block s="reportGet"><l><option>center x</option></l></block></block><block s="reportMonadic"><l><option>neg</option></l><block s="reportGet"><l><option>center y</option></l></block></block></block><block s="doStamp"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSetVar"><l>new</l><block s="reportPenTrailsAsCostume"></block></block><block s="doApplyExtension"><l>obj_name(obj, name)</l><list><block var="new"/><block s="reportIfElse"><block s="reportListContainsItem"><block s="reportTextSplit"><block s="reportAttributeOf"><l><option>costume name</option></l><l>Sprite</l></block><l><option>word</option></l></block><l>button</l></block><block s="reportAttributeOf"><l><option>costume name</option></l><l>Sprite</l></block><block s="reportJoinWords"><list><block s="reportAttributeOf"><l><option>costume name</option></l><l>Sprite</l></block><l> button</l></list></block></block></list></block><block s="clear"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="doSwitchToCostume"><block var="trails"/></block><block s="doStamp"></block><block s="doSwitchToCostume"><block var="old"/></block><block s="gotoXY"><block var="x"/><block var="y"/></block><block s="setHeading"><block var="dir"/></block><block s="setPenColorDimension"><l><option>r-g-b(-a)</option></l><block var="clr"/></block><block s="doSetGlobalFlag"><l><option>flat line ends</option></l><block var="flat"/></block><block s="setSize"><block var="old size"/></block><block s="doIf"><block var="old pen state"/><script><block s="down"></block></script><list></list></block><block s="doReport"><block var="new"/></block></script><scripts><script x="255" y="186.19999999999993"><custom-block s="costume %s with background RGBA %n padding %n"><custom-block s="costume %s with background RGBA %n padding %n"><custom-block s="costume from text %s size %n"><l>Snap!</l><l>36</l></custom-block><l>200</l><l>10</l></custom-block><l>100</l><l>2</l></custom-block></script><comment x="248.685546875" y="121.03333333333336" w="106" collapsed="false">Use this block to make &quot;clickable&quot; buttons:</comment></scripts></block-definition></blocks>

0 comments on commit 8d3edbd

Please sign in to comment.