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

avm2: Fix mouse pick on non-interactive objects with masks #18311

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

kjarosh
Copy link
Member

@kjarosh kjarosh commented Oct 18, 2024

Fixes #18038.

Mouse pick should take into account that a non-interactive object may have a mask, in which case the hit test should also be performed on the mask.

@kjarosh kjarosh added A-avm2 Area: AVM2 (ActionScript 3) hitTest Issues involving mouse picking and hitTest T-fix Type: Bug fix (in something that's supposed to work already) labels Oct 18, 2024
@kjarosh kjarosh force-pushed the avm2-mpick-non-inter-mask branch 2 times, most recently from bbcde7a to 4447361 Compare October 18, 2024 18:19
Copy link
Contributor

@Dinnerbone Dinnerbone left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

Mouse pick should take into account that a non-interactive object
may have a mask, in which case the hit test should also be
performed on the mask.
This test verifies mouse picking behavior on
non-interactive objects with masks.
@kjarosh
Copy link
Member Author

kjarosh commented Oct 18, 2024

Just fixed the commit message so that it doesn't suggest we should hit test the mask only 👀

@Lord-McSweeney Lord-McSweeney merged commit 8ba1971 into ruffle-rs:master Oct 18, 2024
17 checks passed
@kjarosh kjarosh deleted the avm2-mpick-non-inter-mask branch October 18, 2024 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-avm2 Area: AVM2 (ActionScript 3) hitTest Issues involving mouse picking and hitTest T-fix Type: Bug fix (in something that's supposed to work already)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There will be a large offset when you click on the Sprite
3 participants