fix input.input. typing

This commit is contained in:
Amerlander
2020-03-19 16:26:40 +01:00
parent 0803a13033
commit f30ff02987
57 changed files with 101 additions and 101 deletions

View File

@ -23,7 +23,7 @@ confuse the @boardname@.
This example runs the calibration when the user presses **A+B** buttons.
```blocks
input.input.onButtonEvent(Button.AB, ButtonEvent.Click, () => {
input.onButtonEvent(Button.AB, ButtonEvent.Click, () => {
input.calibrateCompass();
})
```

View File

@ -70,7 +70,7 @@ confuse the @boardname@.
Keep the calibration handy by running it when the user pressed **A+B**.
```block
input.input.onButtonEvent(Button.AB, ButtonEvent.Click, () => {
input.onButtonEvent(Button.AB, ButtonEvent.Click, () => {
input.calibrateCompass();
})
```

View File

@ -29,7 +29,7 @@ program shows the light level
on the [LED screen](/device/screen).
```blocks
input.input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
let level = input.lightLevel()
basic.showNumber(level)
})

View File

@ -9,7 +9,7 @@ on the @boardname@.
* For `A` and `B` together: This handler works when `A` and `B` are both pushed down, then one of them is released within 1.5 seconds of pushing down the second button.
```sig
input.input.onButtonEvent(Button.A, ButtonEvent.Click, () => {})
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {})
```
Find out how buttons provide input to the @boardname@ in this video:
@ -24,7 +24,7 @@ Each time you press the button, the [LED screen](/device/screen) shows the `coun
```blocks
let count = 0
basic.showNumber(count)
input.input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
count++;
basic.showNumber(count);
})
@ -35,7 +35,7 @@ input.input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
This example shows a number from 1 to 6 when you press the `B` button.
```blocks
input.input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
let dice = Math.randomRange(0, 5) + 1
basic.showNumber(dice)
})

View File

@ -18,7 +18,7 @@ program finds the number of milliseconds since the program started
and shows it on the [LED screen](/device/screen).
```blocks
input.input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
let now = input.runningTime()
basic.showNumber(now)
})