How to make a click mask for interactive guide?

Godot Version



I know how to use Control.mouse_filter to block click. The problem is how to cut a hole on the click blocker and only allow click through the hole.

After looking into the source code of TextureButton, I found a solution.

Control._has_point is used to test whether a click is inside the control. Override it and you can filter any click.

Placing another control node that processes the clicks to represent the “hole” on top could make the implementation easier.

If you’re using TextureButton, why not use the click_mask variable?