Skip to content

Fix sliders & cycling controllers 26.3+ by using constants for mouse buttons (Fixes #348) - #358

Merged
isXander merged 1 commit into
isXander:mainfrom
mfishma:fix/sliders-n-enums-mouse
Aug 17, 2026
Merged

Fix sliders & cycling controllers 26.3+ by using constants for mouse buttons (Fixes #348)#358
isXander merged 1 commit into
isXander:mainfrom
mfishma:fix/sliders-n-enums-mouse

Conversation

@mfishma

@mfishma mfishma commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

I ran into the same issue as #348 with sliders when testing my mod on 26.3.

In 26.3-snapshot-4, we get "unified" mouse device input numbering (mapping left click to 1 instead of 0).
I saw the slider component had these buttons hard-coded, and searched the code to find that the cycling controller was the only other place the code hardcoded 0 and 1 for left and right buttons.

I swapped these hardcoded integers out for InputConstants.MOUSE_BUTTON_LEFT and InputConstants.MOUSE_BUTTON_RIGHT like I saw in OptionListWidget and YACLScreen. Now they work great on Fabric 26.3. I assume since there's no Stonecutter branching in those scenarios, and the rest of the code already relies on these constants working fine across all versions, then there's virtually zero risk of this breaking anything on older versions.

@isXander
isXander merged commit 8e33260 into isXander:main Aug 17, 2026
1 check passed
@isXander

Copy link
Copy Markdown
Owner

Thank you!

@mfishma
mfishma deleted the fix/sliders-n-enums-mouse branch August 19, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants