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 ability radial menu unexpectedly grabbing focus #3

Merged
merged 3 commits into from
Dec 1, 2024

Conversation

wlhlm
Copy link
Member

@wlhlm wlhlm commented Nov 25, 2024

When the ability radial menu was bound to a keyboard key, it was challenging to select an ability as the menu would grab the mouse cursor again immediately after opening. This did not affect bindings to mouse buttons.

Couldn't prevent myself from including some simple refactorings as the code wasn't great. This is all in a separate commit. I can drop it in case there are concerns with it in regard to our current dev freeze.

Fixes GTNewHorizons/GT-New-Horizons-Modpack#17347

@Ruling-0
Copy link

Tested - works. With key it's functionally similar to pre-2.7 (a possible improvement, if possible, is for it to not regrab the cursor to center on clicking on a gear piece so that I can spam left click on gear to quickly forward through states, instead of having to move the mouse back to it every change).

With mouse button (button 5), it closes the UI after clicking gear once, making it a bit hard to use. However, it is functional, which is an improvement over being totally broken.

@wlhlm
Copy link
Member Author

wlhlm commented Nov 26, 2024

I've looked into this: the first point I can probably implement, needs a mixin. Will be after 2.7. The second point is a limitation of vanilla (mouse buttons stop reporting after the game releases the mouse pointer) and I don't deem it worth implementing a workaround for it.

@wlhlm
Copy link
Member Author

wlhlm commented Nov 26, 2024

Would appreciate a review to get this in for 2.7.

@Dream-Master
Copy link
Member

if this got reviewed why not rc2 next Weekend

@wlhlm
Copy link
Member Author

wlhlm commented Nov 26, 2024

if this got reviewed why not rc2 next Weekend

Sure, however you prefer it.

Copy link

@Ethryan Ethryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the best at mixin, but it looks like it should work.

@Dream-Master Dream-Master merged commit a88b9a0 into master Dec 1, 2024
1 check passed
@Dream-Master Dream-Master deleted the fix-ability-radial-focusing branch December 1, 2024 19:25
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.

Traveller's Gear Ability Switching UI Broken
4 participants