From 988a2b638b36b117b2d32344a37a8cbb16b81249 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 16 Nov 2017 22:52:29 -0800 Subject: [PATCH] add icon --- libs/core/_locales/core-strings.json | 3 ++- libs/core/screen.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/core/_locales/core-strings.json b/libs/core/_locales/core-strings.json index d44bf349..bf0ada2e 100644 --- a/libs/core/_locales/core-strings.json +++ b/libs/core/_locales/core-strings.json @@ -35,6 +35,7 @@ "brick.Button.isPressed|block": "`icons.brickButtons` %button|is pressed", "brick.Button.onEvent|block": "on `icons.brickButtons` %button|%event", "brick.Button.wasPressed|block": "`icons.brickButtons` %button|was pressed", + "brick._imagePicker|block": "%image", "brick.buttonDown|block": "down", "brick.buttonEnter|block": "enter", "brick.buttonLeft|block": "left", @@ -44,7 +45,7 @@ "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.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", "control.raiseEvent|block": "raise event|from %src|with value %value", "control|block": "control", diff --git a/libs/core/screen.ts b/libs/core/screen.ts index edf2aa08..710082c7 100644 --- a/libs/core/screen.ts +++ b/libs/core/screen.ts @@ -137,7 +137,7 @@ namespace brick { * Shows an image on screen * @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 export function showImage(image: Image, delay: number = 400) { if (!image) return; @@ -152,7 +152,7 @@ namespace brick { */ //% blockId=scren_image_picker block="%image" shim=TD_ID //% image.fieldEditor="imagedropdown" - //% image.fieldOptions.columns=8 + //% image.fieldOptions.columns=6 //% block.fieldOptions.hasSearchBar=true //% group="Screen" weight=0 blockHidden=1 export function _imagePicker(image: Image): Image {