Click or drag to resize

OSSetWindowMousePassthrough Method

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).

# 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.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static void SetWindowMousePassthrough(
	Vector2[] region
)

Parameters

region
Type: GodotVector2

[Missing <param name="region"/> documentation for "M:Godot.OS.SetWindowMousePassthrough(Godot.Vector2[])"]

See Also