summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-26 01:14:23 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-26 01:14:23 +0100
commit18a2e7ff6ebf0a477138c12c3efa63c15270a2ee (patch)
tree782b91df7d5d74753c68373cd08d33d2f739e2a0
parentbc73e320148c5474cd8d03a94716526a743b5147 (diff)
parent91e2d699b4c40b5fe65fc39bc14e32cee7bd0286 (diff)
Merge pull request #72082 from Calinou/warp-mouse-silence-warning
Silence `warp_mouse()` warning in favor of documentation
-rw-r--r--doc/classes/Control.xml1
-rw-r--r--doc/classes/DisplayServer.xml1
-rw-r--r--doc/classes/Input.xml1
-rw-r--r--doc/classes/Viewport.xml1
-rw-r--r--servers/display_server.cpp1
5 files changed, 4 insertions, 1 deletions
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 7082eff97d..6f665ff98a 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -895,6 +895,7 @@
<param index="0" name="position" type="Vector2" />
<description>
Moves the mouse cursor to [param position], relative to [member position] of this [Control].
+ [b]Note:[/b] [method warp_mouse] is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web.
</description>
</method>
</methods>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index b77ec4c517..b0657cab90 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -1090,6 +1090,7 @@
<param index="0" name="position" type="Vector2i" />
<description>
Sets the mouse cursor position to the given [param position] relative to an origin at the upper left corner of the currently focused game Window Manager window.
+ [b]Note:[/b] [method warp_mouse] is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web.
</description>
</method>
<method name="window_can_draw" qualifiers="const">
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 3b0cfb3825..70e629974d 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -375,6 +375,7 @@
<description>
Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the currently focused Window Manager game window.
Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if [enum MouseMode] is set to [constant MOUSE_MODE_CONFINED] or [constant MOUSE_MODE_CONFINED_HIDDEN].
+ [b]Note:[/b] [method warp_mouse] is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web.
</description>
</method>
</methods>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 236d34383f..84d3d818c3 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -210,6 +210,7 @@
<param index="0" name="position" type="Vector2" />
<description>
Moves the mouse pointer to the specified position in this [Viewport] using the coordinate system of this [Viewport].
+ [b]Note:[/b] [method warp_mouse] is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web.
</description>
</method>
</methods>
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index 39f14439f4..11bbd9dae2 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -344,7 +344,6 @@ DisplayServer::MouseMode DisplayServer::mouse_get_mode() const {
}
void DisplayServer::warp_mouse(const Point2i &p_position) {
- WARN_PRINT("Mouse warping is not supported by this display server.");
}
Point2i DisplayServer::mouse_get_position() const {