-
Notifications
You must be signed in to change notification settings - Fork 81
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
GUIopedia links bug out when you scroll before clicking #614
Comments
I have successfully tracked down the bug! First, I ascertained that the bug I describe above only happened if you used the MOUSEWHEEL to scroll. Or at least, it did not happen when moving the scrollbar by clicking. Second, I tracked down the issue to involving the UITextBox's update method. The following bit of code from this event was firing, resetting the scrollbar and overwriting mouse click events:
Third, I tracked down where self.cursor_has_moved_recently was being set prior this bug occuring, and I discovered that it was in the following method, also of the UITextBox class:
I was able to apply a quick fix for myself by simply commenting out the line setting self.cursor_has_moved_recently. This resolved the bug, and as far as I can tell did not change behavior otherwise. Why this interaction between mouse wheel scrolling and the focus method caused this bug, I lack the skill to determine. As such, I'm leaving this issue open till a developer comes along with a comment/explanation and a proper fix. Hopefully though this can help people running into the same issue as me. |
Describe the bug
This is based on the guiopedia example found in the pygame_gui_examples repository here: https://github.com/MyreMylar/pygame_gui_examples/blob/master/guiopedia.py
When you start on a page with a reference link. If the page has enough text that you need to scroll down first before you can click the link, clicking that link will not take you to the linked page but instead to the top of the page you are on. Subsequent scrolling and clicking does take you to the reference page.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Scrolling should not affect behavior when links are clicked.
Screenshots
Platform and software (please complete the following information):
Additional context
I was planning to make pretty extensive use of the Guiopedia feature for my project, so this is a bit of a bummer. It is probably above my skill to bug fix, so any help would be greatly appreciated!!! :)
The text was updated successfully, but these errors were encountered: