Improve description of mouse_exited signal
This commit is contained in:
parent
96a20e477b
commit
4eec0032ea
1 changed files with 6 additions and 0 deletions
|
|
@ -1113,6 +1113,12 @@
|
||||||
<description>
|
<description>
|
||||||
Emitted when the mouse leaves the control's [code]Rect[/code] area, provided its [member mouse_filter] lets the event reach it.
|
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.
|
[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>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="resized">
|
<signal name="resized">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue