From 0277f57b6fdeafb18478bd404b8c2610bedc60d1 Mon Sep 17 00:00:00 2001 From: kobewi Date: Mon, 1 May 2023 13:50:34 +0200 Subject: Some clarifications on screen-space coordinates (cherry picked from commit 33b9be27d39503897933726d1c5560e4ec271222) --- doc/classes/CanvasItem.xml | 1 + doc/classes/DisplayServer.xml | 2 +- doc/classes/Window.xml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') 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 @@ 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]. 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 @@ - Returns the mouse cursor's current position. + Returns the mouse cursor's current position in screen coordinates. 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 @@ 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]. The window's size in pixels. -- cgit v1.2.3