diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-11-09 08:29:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 08:29:44 +0100 |
commit | 593e35346ab182c36068c3dcfc741eeb7311a19e (patch) | |
tree | b286b8551eefaf417bb39f52837c6a375772f0cc /doc/classes/DisplayServer.xml | |
parent | 4206dc6ac95bed86d8f8d040a0e1b73431cdb750 (diff) | |
parent | 8fb113bb4c3d70c5952924031dffa6b850263207 (diff) |
Merge pull request #42841 from HaSa1002/docs-lang-3
Port code examples to C# (D and E)
Diffstat (limited to 'doc/classes/DisplayServer.xml')
-rw-r--r-- | doc/classes/DisplayServer.xml | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 1d437739e2..d91ea6528a 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -923,7 +923,8 @@ <description> 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). - [codeblock] + [codeblocks] + [gdscript] # Set region, using Path2D node. DisplayServer.window_set_mouse_passthrough($Path2D.curve.get_baked_points()) @@ -932,7 +933,18 @@ # Reset region to default. DisplayServer.window_set_mouse_passthrough([]) - [/codeblock] + [/gdscript] + [csharp] + // Set region, using Path2D node. + DisplayServer.WindowSetMousePassthrough(GetNode<Path2D>("Path2D").Curve.GetBakedPoints()); + + // Set region, using Polygon2D node. + DisplayServer.WindowSetMousePassthrough(GetNode<Polygon2D>("Polygon2D").Polygon); + + // Reset region to default. + DisplayServer.WindowSetMousePassthrough(new Vector2[] {}); + [/csharp] + [/codeblocks] [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux and macOS it is. [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> |