V4 updates (#210)
* update pxt.json files * Fix button event enums fixes https://github.com/microsoft/pxt-calliope/issues/206 * Fix Safari CSS Rule for iOS app fixes https://github.com/microsoft/pxt-calliope/issues/205 * aprove preffered repos should fix https://github.com/microsoft/pxt-calliope/issues/167
This commit is contained in:
@ -29,7 +29,7 @@ control.inBackground(() => {
|
||||
basic.pause(100)
|
||||
}
|
||||
})
|
||||
input.onButtonEvent(Button.A, ButtonEvent.Down, () => {
|
||||
input.onButtonEvent(Button.A, input.buttonEventValue(ButtonEvent.Down), () => {
|
||||
num++;
|
||||
})
|
||||
```
|
||||
@ -42,7 +42,7 @@ let num = 0
|
||||
basic.forever(() => {
|
||||
basic.showNumber(num)
|
||||
})
|
||||
input.onButtonEvent(Button.A, ButtonEvent.Down, () => {
|
||||
input.onButtonEvent(Button.A, input.buttonEventValue(ButtonEvent.Down), () => {
|
||||
num++;
|
||||
})
|
||||
```
|
||||
|
@ -24,11 +24,11 @@ When you get tired of counting, press button `B` to reset the
|
||||
```blocks
|
||||
let item = 0;
|
||||
basic.showNumber(item);
|
||||
input.onButtonEvent(Button.A, ButtonEvent.Down, () => {
|
||||
input.onButtonEvent(Button.A, input.buttonEventValue(ButtonEvent.Down), () => {
|
||||
item = item + 1;
|
||||
basic.showNumber(item);
|
||||
});
|
||||
input.onButtonEvent(Button.B, ButtonEvent.Down, () => {
|
||||
input.onButtonEvent(Button.B, input.buttonEventValue(ButtonEvent.Down), () => {
|
||||
control.reset();
|
||||
});
|
||||
```
|
||||
|
Reference in New Issue
Block a user