This commit is contained in:
Juri
2020-08-19 22:03:58 +02:00
parent 4ef7b9318f
commit 3152215415
291 changed files with 9511 additions and 2966 deletions

View File

@ -29,10 +29,10 @@ Display a left arrow when button A is pressed or a right arrow when button B is
let arrowLeft = images.arrowImage(ArrowNames.West)
let arrowRight = images.arrowImage(ArrowNames.East)
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
input.onButtonPressed(Button.A, () => {
arrowLeft.showImage(0);
});
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
input.onButtonPressed(Button.B, () => {
arrowRight.showImage(0);
});
```

View File

@ -36,10 +36,10 @@ let arrows = images.createBigImage(`
. . # . . . # # # .
. . # . . . . # . .
`);
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
input.onButtonPressed(Button.A, () => {
arrows.showImage(0);
});
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
input.onButtonPressed(Button.B, () => {
arrows.showImage(5);
});
```

View File

@ -25,7 +25,7 @@ arrow and show it on the LED screen. If you press button `B`, the
program will show a picture of the arrow upside-down.
```blocks
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
input.onButtonPressed(Button.A, () => {
images.createImage(`
. . # . .
. # # # .
@ -34,7 +34,7 @@ input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
. . # . .
`).showImage(0);
});
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
input.onButtonPressed(Button.B, () => {
images.createImage(`
. . # . .
. . # . .

View File

@ -20,10 +20,10 @@ Show a happy face when button A is pressed or a sad face when button B is presse
let iamHappy = images.iconImage(IconNames.Happy)
let iamSad = images.iconImage(IconNames.Sad)
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
input.onButtonPressed(Button.A, () => {
iamHappy.showImage(0);
});
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
input.onButtonPressed(Button.B, () => {
iamSad.showImage(0);
});
```

View File

@ -31,10 +31,10 @@ let arrows = images.createBigImage(`
. . # . . . # # # .
. . # . . . . # . .
`);
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
input.onButtonPressed(Button.A, () => {
arrows.showImage(0);
});
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
input.onButtonPressed(Button.B, () => {
arrows.showImage(5);
});
```