add icon
This commit is contained in:
parent
fb743dea74
commit
988a2b638b
@ -35,6 +35,7 @@
|
|||||||
"brick.Button.isPressed|block": "`icons.brickButtons` %button|is pressed",
|
"brick.Button.isPressed|block": "`icons.brickButtons` %button|is pressed",
|
||||||
"brick.Button.onEvent|block": "on `icons.brickButtons` %button|%event",
|
"brick.Button.onEvent|block": "on `icons.brickButtons` %button|%event",
|
||||||
"brick.Button.wasPressed|block": "`icons.brickButtons` %button|was pressed",
|
"brick.Button.wasPressed|block": "`icons.brickButtons` %button|was pressed",
|
||||||
|
"brick._imagePicker|block": "%image",
|
||||||
"brick.buttonDown|block": "down",
|
"brick.buttonDown|block": "down",
|
||||||
"brick.buttonEnter|block": "enter",
|
"brick.buttonEnter|block": "enter",
|
||||||
"brick.buttonLeft|block": "left",
|
"brick.buttonLeft|block": "left",
|
||||||
@ -44,7 +45,7 @@
|
|||||||
"brick.print|block": "`icons.brickDisplay` print %text| at x: %x| y: %y",
|
"brick.print|block": "`icons.brickDisplay` print %text| at x: %x| y: %y",
|
||||||
"brick.setPixel|block": "`icons.brickDisplay` set pixel %on| at x: %x| y: %y",
|
"brick.setPixel|block": "`icons.brickDisplay` set pixel %on| at x: %x| y: %y",
|
||||||
"brick.setStatusLight|block": "set `icons.brickButtons` to %pattern=led_pattern",
|
"brick.setStatusLight|block": "set `icons.brickButtons` to %pattern=led_pattern",
|
||||||
"brick.showImage|block": "show image %image=scren_image_picker",
|
"brick.showImage|block": "`icons.brickDisplay` show image %image=scren_image_picker",
|
||||||
"brick|block": "brick",
|
"brick|block": "brick",
|
||||||
"control.raiseEvent|block": "raise event|from %src|with value %value",
|
"control.raiseEvent|block": "raise event|from %src|with value %value",
|
||||||
"control|block": "control",
|
"control|block": "control",
|
||||||
|
@ -137,7 +137,7 @@ namespace brick {
|
|||||||
* Shows an image on screen
|
* Shows an image on screen
|
||||||
* @param image image to draw
|
* @param image image to draw
|
||||||
*/
|
*/
|
||||||
//% blockId=screen_show_image block="show image %image=scren_image_picker"
|
//% blockId=screen_show_image block="`icons.brickDisplay` show image %image=scren_image_picker"
|
||||||
//% weight=95 group="Screen" blockGap=8
|
//% weight=95 group="Screen" blockGap=8
|
||||||
export function showImage(image: Image, delay: number = 400) {
|
export function showImage(image: Image, delay: number = 400) {
|
||||||
if (!image) return;
|
if (!image) return;
|
||||||
@ -152,7 +152,7 @@ namespace brick {
|
|||||||
*/
|
*/
|
||||||
//% blockId=scren_image_picker block="%image" shim=TD_ID
|
//% blockId=scren_image_picker block="%image" shim=TD_ID
|
||||||
//% image.fieldEditor="imagedropdown"
|
//% image.fieldEditor="imagedropdown"
|
||||||
//% image.fieldOptions.columns=8
|
//% image.fieldOptions.columns=6
|
||||||
//% block.fieldOptions.hasSearchBar=true
|
//% block.fieldOptions.hasSearchBar=true
|
||||||
//% group="Screen" weight=0 blockHidden=1
|
//% group="Screen" weight=0 blockHidden=1
|
||||||
export function _imagePicker(image: Image): Image {
|
export function _imagePicker(image: Image): Image {
|
||||||
|
Loading…
Reference in New Issue
Block a user