OSSingleton.setWindowMousePassthrough

Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).

More...
struct OSSingleton
@nogc nothrow
void
setWindowMousePassthrough
(
in PoolVector2Array region
)

Detailed Description

# Set region, using Path2D node. OS.set_window_mouse_passthrough($Path2D.curve.get_baked_points())

# Set region, using Polygon2D node. OS.set_window_mouse_passthrough($Polygon2D.polygon)

# Reset region to default. OS.set_window_mouse_passthrough([])

Note: On Windows, the portion of a window that lies outside the region is not drawn, while on Linux and macOS it is. Note: This method is implemented on Linux, macOS and Windows.

Meta