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

@ -15,7 +15,7 @@ led.enable(false);
This program turns off the screen when pressing button ``B``
```blocks
input.onButtonPressed(Button.B, () => {
input.input.onButtonEvent(Button.B, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
led.enable(false)
});
```

View File

@ -13,7 +13,7 @@ This program sets up the ``stop animation`` part of the program,
and then shows a string that you can stop with button ``B``.
```blocks
input.onButtonPressed(Button.B, () => {
input.input.onButtonEvent(Button.B, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
led.stopAnimation();
});
basic.showString("STOP ME! STOP ME! PLEASE, WON'T SOMEBODY STOP ME?");