-
-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
Project/Editor Settings contents displayed weirdly depending on the scroll position (regression from #32959) #36087
Comments
Bisected, that's a regression from #32959 (@georgwacker @groud). |
What does position of scroll mean exactly, do you have to do something to trigger the glitch? I don't see this bug in my build of 3e3f8a4, if I just open the project settings for example and scroll in one of the view containers. I also tested this with a fresh Godot profile in Windows. |
Reduce the size of the Editor Settings dialog to have a long enough scrollable section, and scroll down. At some specific scroll values (likely non-integer ones), the bug is triggered. |
Also seems to affect game controls. I think we'd better revert for now (including the cherry pick in 3.2.1 RC 1). |
I had a hard time reproducing this bug on my machine, I took another look with master and finally saw a similar one pixel line cutoff, but nothing like the above. It seems we need another solution for control node animation after all. Looking at the code again, it seems like the control nodes currently rely on the Anyways, until a better solution is found, the old workaround should be restored. Sorry for the regression. |
I tracked this down to ScrollContainer, where godot/scene/gui/scroll_container.cpp Line 302 in e437bcb
Now the question is if we just round the x/y components of godot/scene/gui/scroll_container.cpp Line 90 in e437bcb
|
I would suggest rounding the scroll, since the input event value is divided by 8 and multiplied by some OS-defined factor at godot/scene/gui/scroll_container.cpp Line 104 in e437bcb
|
Your answer could be interpreted both ways :-) I guess you mean to round all the calculations in gui_input, including the one you linked on Line 104? Since in the context of the ScrollContainer, all control nodes should be spaced with integer numbers, always? |
Reverted the cherry-pick from the |
This reverts commit 15315f1. It caused a regression: godotengine#36087.
I'm not sure if this is still reproducible, I couldn't see the issue in Project Settings anymore in a recent There's now a similar issue in popup menus (e.g. Scene menu), but it might be a different cause, as it doesn't seem to be caused by #32959 unlike what was debugged here back in March. |
I’ll take a look at the original jitter problem and the fix I have for the ScrollContainer. As mentioned above it seems to be a rounding issue. |
In master the workaround Line 465 in 07f169a
godot/scene/gui/scroll_container.cpp Line 321 in ae6b2d6
I tested these two changes on the 3.2 branch and they work as expected. As of my original findings, the position based on the scroll value should always be an integer. Should I create a cherrypick pull request for this? |
This is based on suggested fix from this comment godotengine#36087 (comment) -- basically the old rounding workaround is removed, and rounding is now done locally in the scroll_container instead. Fixes godotengine#28804 Co-authored-by: Georg Wacker <contact@georgwacker.com>
This is based on suggested fix from this comment godotengine#36087 (comment) -- basically the old rounding workaround is removed, and rounding is now done locally in the scroll_container instead. Fixes godotengine#28804 Co-authored-by: Georg Wacker <contact@georgwacker.com>
This is fixed with #46409 |
Godot version:
78074fe
Issue description:
![Screenshot_20200210_174114](https://user-images.githubusercontent.com/30739239/74189852-0fd28580-4c49-11ea-8628-a802ace7785b.png)
Depending on the position of scroll, the contents of both Project and Editor Settings dialogs display weirdly. This doesn't happen in 3.2:
The text was updated successfully, but these errors were encountered: