more icons

This commit is contained in:
Peli de Halleux 2017-11-16 22:03:43 -08:00
parent d100026d5c
commit c936c16c33
7 changed files with 32 additions and 29 deletions

View File

@ -32,18 +32,18 @@
"TouchSensorEvent.Released|block": "released",
"UltrasonicSensorEvent.ObjectDetected|block": "object detected",
"UltrasonicSensorEvent.ObjectNear|block": "object near",
"brick.Button.isPressed|block": "%button|is pressed",
"brick.Button.onEvent|block": "on %button|%event",
"brick.Button.wasPressed|block": "%button|was pressed",
"brick.buttonDown|block": "button down",
"brick.buttonEnter|block": "button enter",
"brick.buttonLeft|block": "button left",
"brick.buttonRight|block": "button right",
"brick.buttonUp|block": "button up",
"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.buttonDown|block": "down",
"brick.buttonEnter|block": "enter",
"brick.buttonLeft|block": "left",
"brick.buttonRight|block": "right",
"brick.buttonUp|block": "up",
"brick.pattern|block": "%pattern",
"brick.print|block": "print %text| at x: %x| y: %y",
"brick.setPixel|block": "set pixel %on| at x: %x| y: %y",
"brick.setStatusLight|block": "set status light %pattern=led_pattern",
"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|block": "brick",
"control.raiseEvent|block": "raise event|from %src|with value %value",
"control|block": "control",
@ -77,9 +77,9 @@
"sensors.InfraredSensor.proximity|block": "`icons.infraredSensor` %infrared|proximity",
"sensors.InfraredSensor.remoteCommand|block": "`icons.infraredSensor` %infrared|remote command",
"sensors.InfraredSensor.wait|block": "wait `icons.infraredSensor` %sensor|for %event",
"sensors.RemoteInfraredBeaconButton.isPressed|block": "`icons.remoteButton` %button|is pressed",
"sensors.RemoteInfraredBeaconButton.onEvent|block": "on `icons.remoteButton` %button|%event",
"sensors.RemoteInfraredBeaconButton.wasPressed|block": "`icons.remoteButton` %button|was pressed",
"sensors.RemoteInfraredBeaconButton.isPressed|block": "`icons.infraredSensor` %button|is pressed",
"sensors.RemoteInfraredBeaconButton.onEvent|block": "on `icons.infraredSensor` %button|%event",
"sensors.RemoteInfraredBeaconButton.wasPressed|block": "`icons.infraredSensor` %button|was pressed",
"sensors.TouchSensor.isTouched|block": "`icons.touchSensor` %sensor|is touched",
"sensors.TouchSensor.onEvent|block": "on `icons.touchSensor` %sensor|%event",
"sensors.UltraSonicSensor.distance|block": "`icons.ultrasonicSensor` %sensor|distance",

View File

@ -84,7 +84,7 @@ namespace brick {
* @param button the button to query the request
*/
//% help=input/button/is-pressed
//% block="%button|is pressed"
//% block="`icons.brickButtons` %button|is pressed"
//% blockId=buttonIsPressed
//% parts="brick"
//% blockNamespace=brick
@ -99,7 +99,7 @@ namespace brick {
* @param button the button to query the request
*/
//% help=input/button/was-pressed
//% block="%button|was pressed"
//% block="`icons.brickButtons` %button|was pressed"
//% blockId=buttonWasPressed
//% parts="brick"
//% blockNamespace=brick
@ -118,7 +118,7 @@ namespace brick {
* @param body code to run when the event is raised
*/
//% help=input/button/on-event
//% blockId=buttonEvent block="on %button|%event"
//% blockId=buttonEvent block="on `icons.brickButtons` %button|%event"
//% parts="brick"
//% blockNamespace=brick
//% weight=99 blockGap=8
@ -180,31 +180,31 @@ namespace brick {
/**
* Enter button on the EV3 Brick.
*/
//% whenUsed block="button enter" weight=95 fixedInstance
//% whenUsed block="enter" weight=95 fixedInstance
export const buttonEnter: Button = new DevButton(DAL.BUTTON_ID_ENTER)
/**
* Left button on the EV3 Brick.
*/
//% whenUsed block="button left" weight=95 fixedInstance
//% whenUsed block="left" weight=95 fixedInstance
export const buttonLeft: Button = new DevButton(DAL.BUTTON_ID_LEFT)
/**
* Right button on the EV3 Brick.
*/
//% whenUsed block="button right" weight=94 fixedInstance
//% whenUsed block="right" weight=94 fixedInstance
export const buttonRight: Button = new DevButton(DAL.BUTTON_ID_RIGHT)
/**
* Up button on the EV3 Brick.
*/
//% whenUsed block="button up" weight=95 fixedInstance
//% whenUsed block="up" weight=95 fixedInstance
export const buttonUp: Button = new DevButton(DAL.BUTTON_ID_UP)
/**
* Down button on the EV3 Brick.
*/
//% whenUsed block="button down" weight=95 fixedInstance
//% whenUsed block="down" weight=95 fixedInstance
export const buttonDown: Button = new DevButton(DAL.BUTTON_ID_DOWN)
}
@ -233,7 +233,7 @@ namespace brick {
* Set lights.
* @param pattern the lights pattern to use.
*/
//% blockId=setLights block="set status light %pattern=led_pattern"
//% blockId=setLights block="set `icons.brickButtons` to %pattern=led_pattern"
//% weight=100 group="Light"
export function setStatusLight(pattern: number): void {
if (currPattern === pattern)

File diff suppressed because one or more lines are too long

View File

@ -93,7 +93,7 @@ namespace sensors {
* @param button the remote button to query the request
*/
//% help=input/remote-infrared-beacon/is-pressed
//% block="`icons.remoteButton` %button|is pressed"
//% block="`icons.infraredSensor` %button|is pressed"
//% blockId=remoteButtonIsPressed
//% parts="remote"
//% blockNamespace=sensors
@ -108,7 +108,7 @@ namespace sensors {
* @param button the remote button to query the request
*/
//% help=input/remote-infrared-beacon/was-pressed
//% block="`icons.remoteButton` %button|was pressed"
//% block="`icons.infraredSensor` %button|was pressed"
//% blockId=remotebuttonWasPressed
//% parts="remote"
//% blockNamespace=sensors
@ -125,7 +125,7 @@ namespace sensors {
* @param body code to run when the event is raised
*/
//% help=input/remote-infrared-beacon/on-event
//% blockId=remotebuttonEvent block="on `icons.remoteButton` %button|%event"
//% blockId=remotebuttonEvent block="on `icons.infraredSensor` %button|%event"
//% parts="remote"
//% blockNamespace=sensors
//% weight=99 blockGap=8

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -84,7 +84,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="set pixel %on| at x: %x| y: %y"
//% blockId=screen_setpixel block="`icons.brickDisplay` 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) {
@ -100,7 +100,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="print %text| at x: %x| y: %y"
//% blockId=screen_print block="`icons.brickDisplay` 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) {