diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-01-12 17:28:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 17:28:34 +0100 |
commit | f927fee49a0df9fa8d502597a9349d0d5c5e5b4a (patch) | |
tree | c82968319a64396e55e840f2c8b88ada31294b24 | |
parent | 929f483ca02e881fb9d0356d784858908886aeed (diff) | |
parent | 4eec0032ea30dc3b61b9d0b623aa89bcdc40df21 (diff) |
Merge pull request #56708 from KoBeWi/to_hover_or_not_to_hover
-rw-r--r-- | doc/classes/Control.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 3d8199831d..d5551e1e04 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1113,6 +1113,12 @@ <description> Emitted when the mouse leaves the control's [code]Rect[/code] area, provided its [member mouse_filter] lets the event reach it. [b]Note:[/b] [signal mouse_exited] will be emitted if the mouse enters a child [Control] node, even if the mouse cursor is still inside the parent's [code]Rect[/code] area. + If you want to check whether the mouse truly left the area, ignoring any top nodes, you can use code like this: + [codeblock] + func _on_mouse_exited(): + if not Rect2(Vector2(), rect_size).has_point(get_local_mouse_position()): + # Not hovering over area. + [/codeblock] </description> </signal> <signal name="resized"> |