summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKabiir <kabiirk@gmail.com>2023-02-06 00:32:50 +0530
committerKabiir <kabiirk@gmail.com>2023-02-07 02:29:28 +0530
commit17ee6fcf03978a8ddfd67020af034ad1d3b7656c (patch)
tree21eb3d76a774091799e948c52e8e114e957d37a9
parent5964e4c202980f5530bc62d448962c6e71f4dcb5 (diff)
Fix description and argument name in Control._has_point
-rw-r--r--doc/classes/Control.xml6
-rw-r--r--scene/gui/control.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index d74ddba369..7d7925d61e 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -144,11 +144,11 @@
</method>
<method name="_has_point" qualifiers="virtual const">
<return type="bool" />
- <param index="0" name="position" type="Vector2" />
+ <param index="0" name="point" type="Vector2" />
<description>
- Virtual method to be implemented by the user. Returns whether the given [param position] is inside this control.
+ Virtual method to be implemented by the user. Returns whether the given [param point] is inside this control.
If not overridden, default behavior is checking if the point is within control's Rect.
- [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code].
+ [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]Rect2(Vector2.ZERO, size).has_point(point)[/code].
</description>
</method>
<method name="_make_custom_tooltip" qualifiers="virtual const">
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index a930b8d972..ec75fcb665 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -3392,7 +3392,7 @@ void Control::_bind_methods() {
ADD_SIGNAL(MethodInfo("minimum_size_changed"));
ADD_SIGNAL(MethodInfo("theme_changed"));
- GDVIRTUAL_BIND(_has_point, "position");
+ GDVIRTUAL_BIND(_has_point, "point");
GDVIRTUAL_BIND(_structured_text_parser, "args", "text");
GDVIRTUAL_BIND(_get_minimum_size);