Skip to content

Commit 9b0b2da

Browse files
committed
button handlers should use context
1 parent 84610a2 commit 9b0b2da

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

cursorscene.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,40 +56,40 @@ namespace user_interface_base {
5656
*/
5757
startup() {
5858
super.startup()
59-
control.onEvent(
59+
context.onEvent(
6060
ControllerButtonEvent.Pressed,
6161
controller.right.id,
6262
() => this.moveCursor(CursorDir.Right)
6363
)
64-
control.onEvent(
64+
context.onEvent(
6565
ControllerButtonEvent.Pressed,
6666
controller.up.id,
6767
() => this.moveCursor(CursorDir.Up)
6868
)
69-
control.onEvent(
69+
context.onEvent(
7070
ControllerButtonEvent.Pressed,
7171
controller.down.id,
7272
() => this.moveCursor(CursorDir.Down)
7373
)
74-
control.onEvent(
74+
context.onEvent(
7575
ControllerButtonEvent.Pressed,
7676
controller.left.id,
7777
() => this.moveCursor(CursorDir.Left)
7878
)
7979

8080
// click
8181
const click = () => this.cursor.click()
82-
control.onEvent(
82+
context.onEvent(
8383
ControllerButtonEvent.Pressed,
8484
controller.A.id,
8585
click
8686
)
87-
control.onEvent(
87+
context.onEvent(
8888
ControllerButtonEvent.Pressed,
8989
controller.A.id + keymap.PLAYER_OFFSET,
9090
click
9191
)
92-
control.onEvent(
92+
context.onEvent(
9393
ControllerButtonEvent.Pressed,
9494
controller.B.id,
9595
() => this.back()

0 commit comments

Comments
 (0)