diff options
author | kobewi <kobewi4e@gmail.com> | 2023-05-01 13:50:34 +0200 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2023-05-12 12:07:01 +0200 |
commit | 0277f57b6fdeafb18478bd404b8c2610bedc60d1 (patch) | |
tree | 2e934fcebfebd7879870f28034aa6f0a7c2f83d3 /doc/classes | |
parent | 907b10fb96cacc5817330f7f3f92f0f8e3f97c01 (diff) |
Some clarifications on screen-space coordinates
(cherry picked from commit 33b9be27d39503897933726d1c5560e4ec271222)
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/CanvasItem.xml | 1 | ||||
-rw-r--r-- | doc/classes/DisplayServer.xml | 2 | ||||
-rw-r--r-- | doc/classes/Window.xml | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 572963b406..d410dcb25a 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -423,6 +423,7 @@ <return type="Vector2" /> <description> Returns the mouse's position in the [CanvasLayer] that this [CanvasItem] is in using the coordinate system of the [CanvasLayer]. + [b]Note:[/b] For screen-space coordinates (e.g. when using a non-embedded [Popup]), you can use [method DisplayServer.mouse_get_position]. </description> </method> <method name="get_global_transform" qualifiers="const"> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 5e898de976..775bddcbe2 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -815,7 +815,7 @@ <method name="mouse_get_position" qualifiers="const"> <return type="Vector2i" /> <description> - Returns the mouse cursor's current position. + Returns the mouse cursor's current position in screen coordinates. </description> </method> <method name="mouse_set_mode"> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index deef703e0d..fe025ff598 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -567,6 +567,7 @@ </member> <member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i(0, 0)"> The window's position in pixels. + If [member ProjectSettings.display/window/subwindows/embed_subwindows] is [code]false[/code], the position is in absolute screen coordinates. This typically applies to editor plugins. If the setting is [code]false[/code], the window's position is in the coordinates of its parent [Viewport]. </member> <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(100, 100)"> The window's size in pixels. |