summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2024-05-03 11:48:46 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2024-05-23 15:23:18 +0300
commit628c81d2d9a2cf05541a8d95dd99f6349aca851d (patch)
treef0063c0a9125e9a6a9562e572429e38efbbb2372 /doc
parentb947c53ddc08d4314b2ce70ca1bc2adb37b83c37 (diff)
downloadredot-engine-628c81d2d9a2cf05541a8d95dd99f6349aca851d.tar.gz
[DisplayServer] Add method to check if window transparency is supported and enabled.
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/DisplayServer.xml8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 688e1b70ca..e157cbb96c 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -930,6 +930,12 @@
Returns [code]true[/code] if touch events are available (Android or iOS), the capability is detected on the Web platform or if [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is [code]true[/code].
</description>
</method>
+ <method name="is_window_transparency_available" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the window background can be made transparent. This method returns [code]false[/code] if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code], or if transparency is not supported by the renderer or OS compositor.
+ </description>
+ </method>
<method name="keyboard_get_current_layout" qualifiers="const">
<return type="int" />
<description>
@@ -2045,7 +2051,7 @@
</constant>
<constant name="WINDOW_FLAG_TRANSPARENT" value="3" enum="WindowFlags">
The window background can be transparent.
- [b]Note:[/b] This flag has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code].
+ [b]Note:[/b] This flag has no effect if [method is_window_transparency_available] returns [code]false[/code].
[b]Note:[/b] Transparency support is implemented on Linux (X11/Wayland), macOS, and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
</constant>
<constant name="WINDOW_FLAG_NO_FOCUS" value="4" enum="WindowFlags">