update input blocks in docs and tests

This commit is contained in:
Amerlander
2020-02-20 04:01:37 +01:00
parent 38cf0ec0c6
commit c2cdcaa40f
62 changed files with 109 additions and 115 deletions

View File

@ -43,7 +43,7 @@ let num = 0
basic.forever(() => {
basic.showNumber(num)
})
input.onButtonPressed(Button.A, () => {
input.input.onButtonEvent(Button.A, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
num = num + 1
})
```
@ -59,7 +59,7 @@ Try this on your @boardname@:
basic.forever(() => {
basic.showNumber(6789)
})
input.onButtonPressed(Button.A, () => {
input.input.onButtonEvent(Button.A, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
basic.showNumber(2)
})
```