Removing icons (#114)

* removing icons

* added "pause for light"
This commit is contained in:
Peli de Halleux
2017-12-19 11:37:33 -08:00
committed by GitHub
parent 9e427898ae
commit 919a03951c
14 changed files with 139 additions and 132 deletions

View File

@ -2,14 +2,14 @@
"TouchSensorEvent.Bumped|block": "bumped",
"TouchSensorEvent.Pressed|block": "pressed",
"TouchSensorEvent.Released|block": "released",
"sensors.TouchSensor.isPressed|block": "`icons.touchSensor` %sensor|is pressed",
"sensors.TouchSensor.onEvent|block": "on `icons.touchSensor` %sensor|%event",
"sensors.TouchSensor.pauseUntil|block": "pause until `icons.touchSensor` %sensor|%event",
"sensors.TouchSensor.wasPressed|block": "`icons.touchSensor` %sensor|was pressed",
"sensors.touchSensor1|block": "1",
"sensors.touchSensor2|block": "2",
"sensors.touchSensor3|block": "3",
"sensors.touchSensor4|block": "4",
"sensors.TouchSensor.isPressed|block": "%sensor|is pressed",
"sensors.TouchSensor.onEvent|block": "on %sensor|%event",
"sensors.TouchSensor.pauseUntil|block": "pause until %sensor|%event",
"sensors.TouchSensor.wasPressed|block": "%sensor|was pressed",
"sensors.touchSensor1|block": "touch 1",
"sensors.touchSensor2|block": "touch 2",
"sensors.touchSensor3|block": "touch 3",
"sensors.touchSensor4|block": "touch 4",
"{id:category}Sensors": "Sensors",
"{id:group}Touch Sensor": "Touch Sensor"
}

View File

@ -42,10 +42,8 @@ namespace sensors {
* @param body code to run when the event is raised
*/
//% help=input/touch-sensor/on-event
//% blockId=touchEvent block="on `icons.touchSensor` %sensor|%event"
//% blockId=touchEvent block="on %sensor|%event"
//% parts="touch"
//% sensor.fieldEditor="imagedropdown"
//% sensor.fieldOptions.columns=4
//% blockNamespace=sensors
//% weight=99 blockGap=8
//% group="Touch Sensor"
@ -59,10 +57,8 @@ namespace sensors {
* @param event the kind of button gesture that needs to be detected
*/
//% help=input/touch-sensor/pause-until
//% blockId=touchWaitUntil block="pause until `icons.touchSensor` %sensor|%event"
//% blockId=touchWaitUntil block="pause until %sensor|%event"
//% parts="touch"
//% sensor.fieldEditor="imagedropdown"
//% sensor.fieldOptions.columns=4
//% blockNamespace=sensors
//% weight=98 blockGap=8
//% group="Touch Sensor"
@ -75,11 +71,9 @@ namespace sensors {
* @param sensor the port to query the request
*/
//% help=input/touch-sensor/is-pressed
//% block="`icons.touchSensor` %sensor|is pressed"
//% block="%sensor|is pressed"
//% blockId=touchIsPressed
//% parts="touch"
//% sensor.fieldEditor="imagedropdown"
//% sensor.fieldOptions.columns=4
//% blockNamespace=sensors
//% weight=81 blockGap=8
//% group="Touch Sensor"
@ -92,11 +86,9 @@ namespace sensors {
* @param sensor the port to query the request
*/
//% help=input/touch-sensor/was-pressed
//% block="`icons.touchSensor` %sensor|was pressed"
//% block="%sensor|was pressed"
//% blockId=touchWasPressed
//% parts="touch"
//% sensor.fieldEditor="imagedropdown"
//% sensor.fieldOptions.columns=4
//% blockNamespace=sensors
//% weight=81 blockGap=8
//% group="Touch Sensor"
@ -105,12 +97,12 @@ namespace sensors {
}
}
//% whenUsed block="1" weight=95 fixedInstance jres=icons.port1
//% whenUsed block="touch 1" weight=95 fixedInstance jres=icons.port1
export const touchSensor1: TouchSensor = new TouchSensor(1)
//% whenUsed block="2" weight=95 fixedInstance jres=icons.port2
//% whenUsed block="touch 2" weight=95 fixedInstance jres=icons.port2
export const touchSensor2: TouchSensor = new TouchSensor(2)
//% whenUsed block="3" weight=95 fixedInstance jres=icons.port3
//% whenUsed block="touch 3" weight=95 fixedInstance jres=icons.port3
export const touchSensor3: TouchSensor = new TouchSensor(3)
//% whenUsed block="4" weight=95 fixedInstance jres=icons.port4
//% whenUsed block="touch 4" weight=95 fixedInstance jres=icons.port4
export const touchSensor4: TouchSensor = new TouchSensor(4)
}