Port code examples to C# (D)

Includes:
 * Decal
 * Dictionary
 * Directory
 * DisplayServer
 * DTLSServer
 * DynamicFont
 * EditorImportPlugin
 * EditorPlugin
 * EditorScenePostImport
 * EditorScript
 * EditorSettings
 * EditorTranslationParserPlugin
 * Engine
 * Expression

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
This commit is contained in:
HaSa1002 2020-09-13 14:45:36 +02:00
parent 88a3db5bff
commit 8fb113bb4c
14 changed files with 645 additions and 114 deletions

View file

@ -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&lt;Path2D&gt;("Path2D").Curve.GetBakedPoints());
// Set region, using Polygon2D node.
DisplayServer.WindowSetMousePassthrough(GetNode&lt;Polygon2D&gt;("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>