Block-friendly buttons

This commit is contained in:
Michal Moskal
2017-07-10 14:26:19 +01:00
parent 36050de253
commit df45cb98ef
4 changed files with 37 additions and 6 deletions

View File

@ -29,17 +29,17 @@ input.buttonUp.onEvent(ButtonEvent.Click, () => {
let num = 0
input.touch.button.onEvent(ButtonEvent.Click, () => {
input.touchSensor.onEvent(ButtonEvent.Click, () => {
screen.drawText(10, 60, "Click! " + num)
num++
})
input.ir.button(IrRemoteButton.TopLeft).onEvent(ButtonEvent.Click, () => {
input.remoteTopLeft.onEvent(ButtonEvent.Click, () => {
screen.drawText(10, 60, "TOPLEFT " + num)
num++
})
input.ir.button(IrRemoteButton.TopRight).onEvent(ButtonEvent.Down, () => {
input.remoteTopRight.onEvent(ButtonEvent.Down, () => {
screen.drawText(10, 60, "TOPRIGH " + num)
num++
})