Godot Engine – Multi-platform 2D and 3D game engine
Fix menu can't click at mouse point.x=0 or point.y=0
Nichgon13a1d916c9c9
diff --git a/scene/gui/menu_bar.cpp b/scene/gui/menu_bar.cppindex 62701c00f80..c1e71e47682 100644--- a/scene/gui/menu_bar.cpp+++ b/scene/gui/menu_bar.cpp@@ -405,8 +405,8 @@ int MenuBar::_get_index_at_point(const Point2 &p_point) const {continue;}Size2 size = menu_cache[i].text_buf->get_size() + style->get_minimum_size();- if (point.x > offset && point.x < offset + size.x) {- if (point.y > 0 && point.y < size.y) {+ if (point.x >= offset && point.x < offset + size.x) {+ if (point.y >= 0 && point.y < size.y) {return i;}}