Add a method for obtaining display cutouts on Android

This commit is contained in:
Marcel Admiraal
2022-04-24 21:12:22 +02:00
parent bfc727d970
commit 71ce5857ec
8 changed files with 67 additions and 0 deletions

View File

@@ -104,6 +104,13 @@
<description>
</description>
</method>
<method name="get_display_cutouts" qualifiers="const">
<return type="Array" />
<description>
Returns an [Array] of [Rect2], each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also [method screen_get_usable_rect].
[b]Note:[/b] Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches.
</description>
</method>
<method name="get_name" qualifiers="const">
<return type="String" />
<description>