Fix block tests by removing arrow, reverting block string (#158)

This commit is contained in:
Richard Knoll 2022-03-23 13:23:00 -07:00 committed by GitHub
parent 4ad5c2d4a0
commit d4214c65f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 693 deletions

View File

@ -120,7 +120,7 @@
"IconNames.SmallHeart|block": "small heart", "IconNames.SmallHeart|block": "small heart",
"IconNames.Surprised|block": "surprised", "IconNames.Surprised|block": "surprised",
"IconNames.Yes|block": "yes", "IconNames.Yes|block": "yes",
"Image.scrollImage|block": "scroll image %sprite(myImage)|with offset %frameoffset|and interval (ms) %interval", "Image.scrollImage|block": "scroll image %sprite(myImage)|with offset %frameoffset|and interval (ms) %delay",
"Image.showImage|block": "show image %sprite(myImage)|at offset %offset ||and interval (ms) %interval", "Image.showImage|block": "show image %sprite(myImage)|at offset %offset ||and interval (ms) %interval",
"JSON|block": "JSON", "JSON|block": "JSON",
"LedSpriteProperty.Blink|block": "blink", "LedSpriteProperty.Blink|block": "blink",

View File

@ -30,10 +30,10 @@
<next> <next>
<block type="device_clear_display"> <block type="device_clear_display">
<next> <next>
<block type="basic_show_arrow"> <block type="device_pause">
<value name="i"> <value name="pause">
<shadow type="device_arrow"> <shadow type="math_number">
<field name="arrow">ArrowNames.South</field> <field name="NUM">100</field>
</shadow> </shadow>
</value> </value>
</block> </block>

View File

@ -14,17 +14,9 @@
<shadow type="math_number" id="KX(1%=^vQUd=Q`UHhD*n"> <shadow type="math_number" id="KX(1%=^vQUd=Q`UHhD*n">
<field name="NUM">0</field> <field name="NUM">0</field>
</shadow> </shadow>
<block type="device_arrow">
<field name="arrow">ArrowNames.South</field>
</block>
</value> </value>
<next> <next>
<block type="device_scroll_image"> <block type="device_scroll_image">
<value name="sprite">
<block type="builtin_arrow_image">
<field name="i">ArrowNames.SouthWest</field>
</block>
</value>
<value name="frameoffset"> <value name="frameoffset">
<shadow type="math_number"> <shadow type="math_number">
<field name="NUM">1</field> <field name="NUM">1</field>

File diff suppressed because one or more lines are too long

View File

@ -64,7 +64,7 @@ Buffer charCodeBuffer(int charCode) {
#endif #endif
const int offset = (charCode - MICROBIT_FONT_ASCII_START) * 5;; const int offset = (charCode - MICROBIT_FONT_ASCII_START) * 5;;
const uint8_t* charBuffer = font.characters + offset; const uint8_t* charBuffer = font.characters + offset;
return PXT_CREATE_BUFFER(charBuffer, 5); return PXT_CREATE_BUFFER(charBuffer, 5);
} }
@ -111,7 +111,7 @@ void plotFrame(Image i, int xOffset) {
*/ */
//% help=images/scroll-image weight=79 async blockNamespace=images //% help=images/scroll-image weight=79 async blockNamespace=images
//% blockId=device_scroll_image //% blockId=device_scroll_image
//% block="scroll image %sprite(myImage)|with offset %frameoffset|and interval (ms) %interval" //% block="scroll image %sprite(myImage)|with offset %frameoffset|and interval (ms) %delay"
//% blockGap=8 parts="ledmatrix" //% blockGap=8 parts="ledmatrix"
void scrollImage(Image id, int frameOffset, int interval) { void scrollImage(Image id, int frameOffset, int interval) {
MicroBitImage i(id->img); MicroBitImage i(id->img);

View File

@ -60,7 +60,7 @@ declare interface Image {
*/ */
//% help=images/scroll-image weight=79 async blockNamespace=images //% help=images/scroll-image weight=79 async blockNamespace=images
//% blockId=device_scroll_image //% blockId=device_scroll_image
//% block="scroll image %sprite(myImage)|with offset %frameoffset|and interval (ms) %interval" //% block="scroll image %sprite(myImage)|with offset %frameoffset|and interval (ms) %delay"
//% blockGap=8 parts="ledmatrix" shim=ImageMethods::scrollImage //% blockGap=8 parts="ledmatrix" shim=ImageMethods::scrollImage
scrollImage(frameOffset: int32, interval: int32): void; scrollImage(frameOffset: int32, interval: int32): void;