Some clarifications on screen-space coordinates
(cherry picked from commit 33b9be27d3
)
This commit is contained in:
parent
907b10fb96
commit
0277f57b6f
@ -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">
|
||||
|
@ -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">
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user