hiding the was pressed block (#401)
This commit is contained in:
@ -95,6 +95,7 @@ namespace brick {
|
||||
//% help=brick/button/was-pressed
|
||||
//% block="%button|was pressed"
|
||||
//% blockId=buttonWasPressed
|
||||
//% blockHidden=true
|
||||
//% parts="brick"
|
||||
//% blockNamespace=brick
|
||||
//% weight=80
|
||||
|
@ -26,7 +26,7 @@ In order to recognize a button event signalled from a remote beacon, an infrared
|
||||
|
||||
If the beacon button ``top left`` was pressed, show a `green` status light. Otherwise, set the status light to `orange`.
|
||||
|
||||
```blocks
|
||||
```typescript
|
||||
sensors.infrared1.setRemoteChannel(InfraredRemoteChannel.Ch0)
|
||||
forever(function () {
|
||||
if (sensors.remoteButtonTopLeft.wasPressed()) {
|
||||
|
@ -101,6 +101,7 @@ namespace sensors {
|
||||
//% help=sensors/beacon/was-pressed
|
||||
//% block="**remote button** %button|was pressed"
|
||||
//% blockId=remotebuttonWasPressed
|
||||
//% blockHidden=true
|
||||
//% parts="remote"
|
||||
//% blockNamespace=sensors
|
||||
//% weight=80
|
||||
|
@ -16,7 +16,7 @@ If a touch sensor was pressed, then that event is remembered. Once you check if
|
||||
|
||||
If the touch sensor ``touch 1`` was pressed, show a `green` status light. Otherwise, set the status light to `orange`.
|
||||
|
||||
```blocks
|
||||
```typescript
|
||||
forever(function () {
|
||||
if (sensors.touch1.wasPressed()) {
|
||||
brick.setStatusLight(StatusLight.Green)
|
||||
|
@ -83,6 +83,7 @@ namespace sensors {
|
||||
//% help=sensors/touch-sensor/was-pressed
|
||||
//% block="**touch** %this|was pressed"
|
||||
//% blockId=touchWasPressed
|
||||
//% blockHidden=true
|
||||
//% parts="touch"
|
||||
//% blockNamespace=sensors
|
||||
//% this.fieldEditor="ports"
|
||||
|
Reference in New Issue
Block a user