bring back deprecated blocks, but hide them

This commit is contained in:
Amerlander
2020-02-20 17:49:58 +01:00
parent 07fe2645cf
commit b91ae2c4b5
11 changed files with 91 additions and 23 deletions

View File

@ -12,7 +12,7 @@ Tell everyone who you are. Show you name on the LEDs.
Let's build a **LOVE METER** machine. Place an ``||input:on pin pressed||`` block to run code when pin **0** is pressed. Use ``P0`` from the list of pin inputs.
```blocks
input.onPinEvent(TouchPin.P0, Button.Click, () => {
input.onPinTouched(TouchPin.P0, Button.Click, () => {
});
```
@ -21,7 +21,7 @@ input.onPinEvent(TouchPin.P0, Button.Click, () => {
Using ``||basic:show number||`` and ``||Math:pick random||`` blocks, show a random number from `0` to `100` when pin **0** is pressed.
```blocks
input.onPinEvent(TouchPin.P0, Button.Click, () => {
input.onPinTouched(TouchPin.P0, Button.Click, () => {
basic.showNumber(Math.randomRange(0, 100));
});
```
@ -35,7 +35,7 @@ Show ``"LOVE METER"`` on the screen when the @boardname@ starts.
```blocks
basic.showString("LOVE METER");
input.onPinEvent(TouchPin.P0, Button.Click, () => {
input.onPinTouched(TouchPin.P0, Button.Click, () => {
basic.showNumber(Math.randomRange(0, 100));
});
```

View File

@ -9,7 +9,7 @@ input.input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
input.onGesture(Gesture.Shake, () => {
});
input.onPinEvent(TouchPin.P0, Button.Click, () => {
input.onPinTouched(TouchPin.P0, Button.Click, () => {
});
input.buttonIsPressed(Button.A);

View File

@ -14,7 +14,7 @@ through your body and back into the @boardname@. This is called
**completing a circuit**. It's like you're a big wire!
```sig
input.onPinEvent(TouchPin.P0, Button.Click, () => {
input.onPinTouched(TouchPin.P0, Button.Click, () => {
})
```
@ -43,7 +43,7 @@ Every time you press the pin, the program shows the number of times on the scree
```blocks
let count = 0
basic.showNumber(count)
input.onPinEvent(TouchPin.P0, Button.Click, () => {
input.onPinTouched(TouchPin.P0, Button.Click, () => {
count = count + 1
basic.showNumber(count)
})

View File

@ -13,7 +13,7 @@ through your body and back into the @boardname@. This is called
**completing a circuit**. It's like you're a big wire!
```sig
input.onPinEvent(TouchPin.P0, ButtonEvent.Click, () => {
input.onPinTouched(TouchPin.P0, ButtonEvent.Click, () => {
})
```
@ -36,7 +36,7 @@ Every time you release the pin, the program shows the number of times on the scr
```blocks
let count = 0
basic.showNumber(count, 100)
input.onPinEvent(TouchPin.P0, ButtonEvent.Click, () => {
input.onPinTouched(TouchPin.P0, ButtonEvent.Click, () => {
count = count + 1
basic.showNumber(count, 100)
})