Skip to content

Commit

Permalink
Merge pull request godotengine#98299 from timothyqiu/tree-coordinate
Browse files Browse the repository at this point in the history
Fix button click detection when `Tree` is rotated
  • Loading branch information
Repiteo committed Oct 21, 2024
2 parents a4ed24a + 1764269 commit b3bcb2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/gui/tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3022,7 +3022,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, int
}

// Make sure the click is correct.
Point2 click_pos = get_global_mouse_position() - get_global_position();
const Point2 click_pos = get_local_mouse_position();
if (!get_item_at_position(click_pos)) {
pressed_button = -1;
cache.click_type = Cache::CLICK_NONE;
Expand Down

0 comments on commit b3bcb2d

Please sign in to comment.