Skip to content
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

Fix #696 #697

Merged
merged 2 commits into from
Nov 22, 2023
Merged

Fix #696 #697

merged 2 commits into from
Nov 22, 2023

Conversation

alcatrazEscapee
Copy link
Contributor

Details and reproduction steps are in the linked issue.

Description

In mouseClicked, the boolean return is if the button should set (and clear) isFocused(). For some buttons, it makes sense that clicking them should start and keep focus but this creates undesirable situations for Patchouli's buttons, i.e. the page turn buttons. By always returning false, and only for mouseClicked(), this prevents the button from becoming persistently focused when clicking or scrolling.

Note that this still preserves tab-style operation of the gui - the focus will still be set, and be persistent while tab/enter/arrow keys are being used. It can still create "sticky-tooltip" type situations if both mouse-based and tab-based interaction are mixed.

Video of the fixed behavior (demonstrating both mouse-based interaction, and then tab-based interaction working as intended):

Minecraft.Forge_.1.20.1.-.Singleplayer.2023-11-01.21-29-14.mp4

Better fix that doesn't CME when entries with many pages are clicked too fast. Previous fix caused other buttons to still iterate after one was handled, rather than returning and just handling the last widget.
Fix the spotless.
@williewillus williewillus merged commit 3e9a848 into VazkiiMods:1.20.x Nov 22, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants