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:
@ -13,7 +13,7 @@ basic.showString("Micro!")
|
||||
Well, the text stopped scrolling. Place the ``||basic:show string||`` block in the ``||input:on button pressed||`` slot to scroll your name when button **A** is pressed.
|
||||
|
||||
```blocks
|
||||
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
|
||||
input.onButtonEvent(Button.A, input.buttonEventValue(ButtonEvent.Click), () => {
|
||||
basic.showString("Micro!")
|
||||
});
|
||||
```
|
||||
@ -25,7 +25,7 @@ Place some blocks to display a smiley when button **B** is pressed.
|
||||
Use the dropdown to find ``B``!
|
||||
|
||||
```blocks
|
||||
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
|
||||
input.onButtonEvent(Button.B, input.buttonEventValue(ButtonEvent.Click), () => {
|
||||
basic.showLeds(`
|
||||
# # . # #
|
||||
# # . # #
|
||||
|
@ -13,7 +13,7 @@ basic.showString("My Name")
|
||||
Well, you noticed that the text stopped. Place the ``||basic:show string||`` block in an ``||input:on button pressed||`` block to scroll your name whenever button **A** is pressed.
|
||||
|
||||
```block
|
||||
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
|
||||
input.onButtonEvent(Button.A, input.buttonEventValue(ButtonEvent.Click), () => {
|
||||
basic.showString("My Name")
|
||||
});
|
||||
```
|
||||
@ -23,7 +23,7 @@ input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
|
||||
Ok, let's try to talk to the @boardname@ using a button. Change the text in ``||basic:show string||`` to ask the question "How are you?". Add another ``||basic:show string||`` with "....." to show that the @boardname@ is thinking.
|
||||
|
||||
```block
|
||||
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
|
||||
input.onButtonEvent(Button.A, input.buttonEventValue(ButtonEvent.Click), () => {
|
||||
basic.showString("How are you?")
|
||||
basic.showString(".....");
|
||||
})
|
||||
@ -34,7 +34,7 @@ input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
|
||||
Now, make the @boardname@ give an answer with a smiley face! Find the ``||basic:show leds||`` and draw a smiley face on the block by clicking on the LEDs. Press button **A** in the simulator and see the @boardname@ respond to your question.
|
||||
|
||||
```block
|
||||
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
|
||||
input.onButtonEvent(Button.A, input.buttonEventValue(ButtonEvent.Click), () => {
|
||||
basic.showString("How are you?")
|
||||
basic.showString(".....");
|
||||
basic.showLeds(`
|
||||
|
Reference in New Issue
Block a user