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

Allow click through on transparent areas #14

Closed
dotlogix opened this issue Jul 19, 2024 · 1 comment
Closed

Allow click through on transparent areas #14

dotlogix opened this issue Jul 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@dotlogix
Copy link

Hey there I just found out, that there is an issue if you overlay an Avalonia control with transparency on top of other Godot nodes.

I think it would be useful to override _HasPoint on the AvaloniaControl and execute a hit test against Avalonia. This way you can stack multiple layers of Avalonia/Godot controls on top of each other.

It is actually very simple to do using this method:

public override bool _HasPoint(Vector2 point)
{
    return Control?.InputHitTest(point.ToAvaloniaPoint()) is not null;
}
@MrJul MrJul added the enhancement New feature or request label Sep 21, 2024
@MrJul
Copy link
Owner

MrJul commented Sep 21, 2024

Thanks for the suggestion! I've implemented it on v1.2.0.
Don't hesitate to open a PR next time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants