mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
JS: Expose button event type in gui/widget button callback --nobuild
This commit is contained in:
@@ -137,8 +137,8 @@ eventLoop.subscribe(gui.viewDispatcher.navigation, function (_sub, _, gui, views
|
||||
}, gui, views, eventLoop);
|
||||
|
||||
// go to the demo chooser screen when the right key is pressed on the widget screen
|
||||
eventLoop.subscribe(views.stopwatchWidget.button, function (_sub, buttonId, gui, views) {
|
||||
if (buttonId === "right")
|
||||
eventLoop.subscribe(views.stopwatchWidget.button, function (_sub, buttonEvent, gui, views) {
|
||||
if (buttonEvent.key === "right" && buttonEvent.type === "short")
|
||||
gui.viewDispatcher.switchTo(views.demos);
|
||||
}, gui, views);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user