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
Implement Fully-Featured Event Self-Registration for Images & Texts #2209
base: dev
Are you sure you want to change the base?
Conversation
Adds the plumbing required for images to support image:register_event('left_click', function) and image:register_event('drag', function), potentially making images much more friendly to work with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some clarifying comments
Sets the clicked var to nil on left mouse release
@z16 Thank you for the feedback! I am trying to implement the changes but need some clarifications. Please see my follow up questions. Thanks! |
@z16 Sorry for the delay, but I've implemented much of what was mentioned, plus a lot more. It can be found and demo'd in a fully functional form here: (feel free to re-use this code) It's a lot of changes - trying to flesh out the event self-registration feature as much as possible to lower the barrier to UI development and encourage more UI development - so there may be too many conflicts to event attempt it in the PR, so I figured I'd first mention it before merging it in. I'll take my next action according to the feedback. Summary:
I've added some event variables to them. You can see what I'm doing with those variables in https://github.com/Roland-J/SmartSkillup/blob/main/libs/sms_ui.lua |
Adds the plumbing required for images to support image:register_event('left_click', function) and image:register_event('drag', function), potentially making images much more friendly to work with by lowering the technical barrier to utilizing click events for images. (This functionality could also be extended to images if this PR is found desirable)
Sample addon for demo testing: