summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-10-17 00:59:51 +0200
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-12-07 09:54:29 +0100
commite18107a57ccaf3d93a8893fe36f6d9010e2cdef1 (patch)
tree3828f136f7dd6a96e8d9565438343ea0ab5f58e0 /doc/classes
parentc241f1c52386b21cf2df936ee927740a06970db6 (diff)
Fix Determining Window for Touchscreen
DisplayServer::screen_is_touchscreen will likely never utilize its parameter p_screen. This PR replaces this function by DisplayServer::is_touchscreen_available() with the same functionality. This solves the problem, that a SubViewport was used for determining the screen, which resulted in error messages.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/DisplayServer.xml13
1 files changed, 6 insertions, 7 deletions
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index c59bfbfe4f..4081afa13f 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -719,6 +719,12 @@
[b]Note:[/b] This method is implemented on macOS, Windows and Linux (X11).
</description>
</method>
+ <method name="is_touchscreen_available" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if touch events are available (Android or iOS), the capability is detected on the Webplatform or if [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is [code]true[/code].
+ </description>
+ </method>
<method name="keyboard_get_current_layout" qualifiers="const">
<return type="int" />
<description>
@@ -889,13 +895,6 @@
Returns [code]true[/code] if the screen should never be turned off by the operating system's power-saving measures. See also [method screen_set_keep_on].
</description>
</method>
- <method name="screen_is_touchscreen" qualifiers="const">
- <return type="bool" />
- <param index="0" name="screen" type="int" default="-1" />
- <description>
- Returns [code]true[/code] if the screen can send touch events or if [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is [code]true[/code].
- </description>
- </method>
<method name="screen_set_keep_on">
<return type="void" />
<param index="0" name="enable" type="bool" />