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

Input events #85

Merged
merged 2 commits into from
Jun 10, 2024
Merged

Input events #85

merged 2 commits into from
Jun 10, 2024

Conversation

bhperry
Copy link
Contributor

@bhperry bhperry commented Jun 9, 2024

Adding support for callbacks on window events.

Ended up deciding to go with a really simple system for this to avoid adding unnecessary overhead or restricting how callbacks are processed. A single callback function can be set for each supported type of window event (button, char, mouse enter/exit, mouse move, scroll). If users want to add additional structure to their event handlers (e.g. lists/trees of callback handlers), process events async, etc. then that is left up to them to implement.

Copy link
Contributor

@dusk125 dusk125 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ben!

@bhperry bhperry merged commit 38b1455 into gopxl:main Jun 10, 2024
1 check passed
@bhperry bhperry deleted the bhperry/input-events branch June 10, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants