Skip to content

JS: Expose button event type in gui/widget button callback #4252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

WillyJL
Copy link
Contributor

@WillyJL WillyJL commented Jul 22, 2025

What's new

  • js gui/widget "button" element callback receives a ButtonEvent struct instead of just the button key
  • allows user scripts to choose which event types to handle, otherwise a script based all around widget will struggle differentiating between event types and receive 3+ events for each button press

Verification

  • gui.js example Widget pressing right to go back works as expected

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@portasynthinca3
Copy link
Member

I've bumped the major version of the SDK since this is a breaking change. All extra features from SDK versions 0.1 through 0.3 are thus now recognized as baseline.

@portasynthinca3 portasynthinca3 added New Feature Contains an IMPLEMENTATION of a new feature JS JS Runtime, loader and API labels Jul 22, 2025
@WillyJL WillyJL changed the title JS: Expose button event type in gui/widget button callback --nobuild JS: Expose button event type in gui/widget button callback Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JS JS Runtime, loader and API New Feature Contains an IMPLEMENTATION of a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants