Hide DAL.x behind Enum

This commit is contained in:
Amerlander
2020-02-20 17:00:11 +01:00
parent 004b1d9662
commit 07fe2645cf
56 changed files with 101 additions and 101 deletions

View File

@ -29,7 +29,7 @@ control.inBackground(() => {
basic.pause(100)
}
})
input.input.onButtonEvent(Button.A, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
input.input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
num++;
})
```
@ -42,7 +42,7 @@ let num = 0
basic.forever(() => {
basic.showNumber(num)
})
input.input.onButtonEvent(Button.A, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
input.input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
num++;
})
```

View File

@ -24,11 +24,11 @@ When you get tired of counting, press button `B` to reset the
```blocks
let item = 0;
basic.showNumber(item);
input.input.onButtonEvent(Button.A, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
input.input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
item = item + 1;
basic.showNumber(item);
});
input.input.onButtonEvent(Button.B, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
input.input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
control.reset();
});
```