-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tree button click detection is off #102194
Comments
Seems like this is a broken feature from the start, introduced in #88530 Will confirm that it was broken from the first commit once I've compiled it Edit: Was the same way from the start, so some computation in the PR was incorrect CC @davthedev |
The other thing that makes the click fell off, is that it applies margin only on the right side of the button. Is this the correct behavior? From 4.3 Screencast_20250130_162735.webm |
There is something to refactor in this big widget, in order to bring the hover & click detection to the same logic. What you see is because there is one legacy, yet complex algorithm to compute clicks that was there before, and I added a simpler algorithm to compute hover position updates in order to limit possible side effects. I have not merged both algorithms yet, which should be done at some point. Thank you for bringing those corner cases to my attention. The second one is mysterious, would be because of the horizontal scrolling? I do not have the time to look at it right now, health being in the way at the moment. But I will check it out later. |
Yes that looks to be the case. I made a PR for get_item_area_rect and scrolling, #102116. Maybe something can be used from that? |
Tested versions
Godot v4.4.beta2
System information
Fedora Linux 40 (KDE Plasma) on Wayland - X11 display driver, Multi-window
Issue description
Tree button click detection is off.
Mouse is over one button but you click on another.
In some cases it draws hover state for one button but clicks on another.
Screencast_20250130_143844.webm
Steps to reproduce
Have multiple buttons in a column.
Try to interact with them.
Minimal reproduction project (MRP)
treemouse.zip
The text was updated successfully, but these errors were encountered: