Skip to content
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

[LVGL] Event handler should receive event object for both "Flow" and "Action" handler types #510

Closed
mvladic opened this issue Aug 30, 2024 · 1 comment
Assignees
Milestone

Comments

@mvladic
Copy link
Contributor

mvladic commented Aug 30, 2024

Send an event object through event handler connection line:

image

You can use following functions to get additional info about event:

Event.getCode(<event>)
Event.getCurrentTarget(<event>)
Event.getTarget(<event>)
Event.getUserData(<event>)
Event.getKey(<event>)
Event.getGestureDir(<event>)
Event.getRotaryDiff(<event>)

Also, you can use "Action" for "Handler type" and still get event object:

image

But, this action must have an Input of type event which will receive this event object:

image


Backward compatibly notice:

Before, events like KEY, GESTURE, ROTARY and VALUE_CHANGED (in case of ButtonMatrix widget) were sending some specific data through event handler connection line (for example GESTURE even was sending gesture direction). Now, this is changed so that these events also sends event object, so for example you need to use Event.getGestureDir(event) to get the direction for GESTURE event.

@mvladic mvladic added this to the M22 milestone Aug 30, 2024
@mvladic mvladic self-assigned this Aug 30, 2024
mvladic added a commit that referenced this issue Aug 30, 2024
@mvladic
Copy link
Contributor Author

mvladic commented Aug 30, 2024

Implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants