From 93fd8c8c78552bb3d99b091f834623a1188740c8 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 19 Dec 2017 15:10:13 -0800 Subject: [PATCH] removing more icons --- libs/core/_locales/core-jsdoc-strings.json | 4 ++-- libs/core/_locales/core-strings.json | 18 +++++++++--------- libs/core/buttons.ts | 14 +++++++------- libs/core/screen.ts | 8 ++++---- libs/core/test.ts | 4 ++-- libs/ev3/ns.ts | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/libs/core/_locales/core-jsdoc-strings.json b/libs/core/_locales/core-jsdoc-strings.json index 45c8cab1..309c14dd 100644 --- a/libs/core/_locales/core-jsdoc-strings.json +++ b/libs/core/_locales/core-jsdoc-strings.json @@ -36,12 +36,12 @@ "brick.print|param|text": "the text to print on the screen, eg: \"Hello world\"", "brick.print|param|x": "the starting position's x coordinate, eg: 0", "brick.print|param|y": "the starting position's x coordinate, eg: 0", + "brick.setLight": "Set lights.", + "brick.setLight|param|pattern": "the lights pattern to use.", "brick.setPixel": "Sets a pixel on or off", "brick.setPixel|param|on": "a value indicating if the pixel should be on or off", "brick.setPixel|param|x": "the starting position's x coordinate, eg: 0", "brick.setPixel|param|y": "the starting position's x coordinate, eg: 0", - "brick.setStatusLight": "Set lights.", - "brick.setStatusLight|param|pattern": "the lights pattern to use.", "brick.showImage": "Shows an image on screen", "brick.showImage|param|image": "image to draw", "console": "Reading and writing data to the console output.\n\nReading and writing data to the console output.", diff --git a/libs/core/_locales/core-strings.json b/libs/core/_locales/core-strings.json index 7fa5369f..a68e8a47 100644 --- a/libs/core/_locales/core-strings.json +++ b/libs/core/_locales/core-strings.json @@ -24,23 +24,23 @@ "Output.CD|block": "C+D", "Output.C|block": "C", "Output.D|block": "D", - "brick.Button.isPressed|block": "`icons.brickButtons` %button|is pressed", - "brick.Button.onEvent|block": "on `icons.brickButtons` %button|%event", - "brick.Button.pauseUntil|block": "pause until `icons.brickButtons` %button|%event", - "brick.Button.wasPressed|block": "`icons.brickButtons` %button|was pressed", + "brick.Button.isPressed|block": "%button|is pressed", + "brick.Button.onEvent|block": "on %button|%event", + "brick.Button.pauseUntil|block": "pause until %button|%event", + "brick.Button.wasPressed|block": "%button|was pressed", "brick._imagePicker|block": "%image", "brick.buttonDown|block": "down", "brick.buttonEnter|block": "enter", "brick.buttonLeft|block": "left", "brick.buttonRight|block": "right", "brick.buttonUp|block": "up", - "brick.clearScreen|block": "`icons.brickDisplay` clear screen", + "brick.clearScreen|block": "clear screen", "brick.lightPattern|block": "%pattern", "brick.printPorts|block": "print ports", - "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": "`icons.brickDisplay` show image %image=screen_image_picker", + "brick.print|block": "print %text| at x: %x| y: %y", + "brick.setLight|block": "set light to %pattern=led_pattern", + "brick.setPixel|block": "set pixel %on| at x: %x| y: %y", + "brick.showImage|block": "show image %image=screen_image_picker", "brick|block": "brick", "console.logValue|block": "console|log value %name|= %value", "console.log|block": "console|log %text", diff --git a/libs/core/buttons.ts b/libs/core/buttons.ts index 72af6276..993d319f 100644 --- a/libs/core/buttons.ts +++ b/libs/core/buttons.ts @@ -85,7 +85,7 @@ namespace brick { * @param button the button to query the request */ //% help=input/button/is-pressed - //% block="`icons.brickButtons` %button|is pressed" + //% block="%button|is pressed" //% blockId=buttonIsPressed //% parts="brick" //% blockNamespace=brick @@ -100,7 +100,7 @@ namespace brick { * @param button the button to query the request */ //% help=input/button/was-pressed - //% block="`icons.brickButtons` %button|was pressed" + //% block="%button|was pressed" //% blockId=buttonWasPressed //% parts="brick" //% blockNamespace=brick @@ -119,7 +119,7 @@ namespace brick { * @param body code to run when the event is raised */ //% help=input/button/on-event - //% blockId=buttonEvent block="on `icons.brickButtons` %button|%event" + //% blockId=buttonEvent block="on %button|%event" //% parts="brick" //% blockNamespace=brick //% weight=99 blockGap=8 @@ -133,7 +133,7 @@ namespace brick { * @param ev the event to wait for */ //% help=input/button/pause-until - //% blockId=buttonWaitUntil block="pause until `icons.brickButtons` %button|%event" + //% blockId=buttonWaitUntil block="pause until %button|%event" //% parts="brick" //% blockNamespace=brick //% weight=98 blockGap=8 @@ -248,9 +248,9 @@ namespace brick { * Set lights. * @param pattern the lights pattern to use. */ - //% blockId=setLights block="set `icons.brickButtons` to %pattern=led_pattern" - //% weight=100 group="Light" - export function setStatusLight(pattern: number): void { + //% blockId=setLights block="set light to %pattern=led_pattern" + //% weight=100 group="Buttons" + export function setLight(pattern: number): void { if (currPattern === pattern) return currPattern = pattern diff --git a/libs/core/screen.ts b/libs/core/screen.ts index 2c189c15..9027f5f7 100644 --- a/libs/core/screen.ts +++ b/libs/core/screen.ts @@ -86,7 +86,7 @@ namespace brick { * @param x the starting position's x coordinate, eg: 0 * @param y the starting position's x coordinate, eg: 0 */ - //% blockId=screen_setpixel block="`icons.brickDisplay` set pixel %on| at x: %x| y: %y" + //% blockId=screen_setpixel block="set pixel %on| at x: %x| y: %y" //% weight=98 group="Screen" //% x.min=0 x.max=178 y.min=0 y.max=128 on.fieldEditor=toggleonoff export function setPixel(on: boolean, x: number, y: number) { @@ -102,7 +102,7 @@ namespace brick { * @param x the starting position's x coordinate, eg: 0 * @param y the starting position's x coordinate, eg: 0 */ - //% blockId=screen_print block="`icons.brickDisplay` print %text| at x: %x| y: %y" + //% blockId=screen_print block="print %text| at x: %x| y: %y" //% weight=99 group="Screen" inlineInputMode="inline" blockGap=8 //% x.min=0 x.max=178 y.min=0 y.max=128 export function print(text: string, x: number, y: number, mode = Draw.Normal) { @@ -139,7 +139,7 @@ namespace brick { * Shows an image on screen * @param image image to draw */ - //% blockId=screen_show_image block="`icons.brickDisplay` show image %image=screen_image_picker" + //% blockId=screen_show_image block="show image %image=screen_image_picker" //% weight=95 group="Screen" blockGap=8 export function showImage(image: Image, delay: number = 400) { if (!image) return; @@ -165,7 +165,7 @@ namespace brick { /** * Clears the screen */ - //% blockId=screen_clear_screen block="`icons.brickDisplay` clear screen" + //% blockId=screen_clear_screen block="clear screen" //% weight=94 group="Screen" blockGap=8 export function clearScreen() { screen.clear(); diff --git a/libs/core/test.ts b/libs/core/test.ts index 2147a5ba..648cc6f8 100644 --- a/libs/core/test.ts +++ b/libs/core/test.ts @@ -2,7 +2,7 @@ screen.clear() brick.print("PXT!", 10, 30, Draw.Quad) brick.drawRect(40, 40, 20, 10, Draw.Fill) -brick.setStatusLight(LightsPattern.Orange) +brick.setLight(LightsPattern.Orange) brick.heart.doubled().draw(100, 50, Draw.Double | Draw.Transparent) @@ -12,7 +12,7 @@ brick.buttonEnter.onEvent(ButtonEvent.Click, () => { brick.buttonLeft.onEvent(ButtonEvent.Click, () => { brick.drawRect(10, 70, 20, 10, Draw.Fill) - brick.setStatusLight(LightsPattern.Red) + brick.setLight(LightsPattern.Red) brick.setFont(brick.microbitFont()) }) diff --git a/libs/ev3/ns.ts b/libs/ev3/ns.ts index 422cc6bd..31a7b1f0 100644 --- a/libs/ev3/ns.ts +++ b/libs/ev3/ns.ts @@ -1,6 +1,6 @@ //% color="#68C3E2" weight=100 -//% groups='["Light", "Buttons", "Screen"]' +//% groups='["Buttons", "Screen"]' //% labelLineWidth=0 namespace brick { }