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

Add mouse area layout #64

Merged
merged 2 commits into from
Nov 4, 2023
Merged

Add mouse area layout #64

merged 2 commits into from
Nov 4, 2023

Conversation

JD557
Copy link
Owner

@JD557 JD557 commented Nov 4, 2023

Add a new mouse area layout.

This is not really useful for laying out interim components, but it's useful for custom components that need to handle the mouse input.
With this one can do something like mouseArea(area)(mouse=> custom(area.shrink(5), Color(0, 0, 0), CustomData(mouse))) and then later have a def customComponentApp(data: CustomData): ImageData, where the backend just needs to render the ImageData in the correct position. This is a bit less cumbersome that to have to constantly keep track of the custom component position.

@JD557 JD557 added this to the 0.1.5 milestone Nov 4, 2023
@JD557 JD557 merged commit 1ee5ad4 into master Nov 4, 2023
6 of 8 checks passed
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.

None yet

1 participant