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
TouchScreenGUI: Fix only 9 hotbar slots being usable #13698
Conversation
Thank you for this fix. I was not sure about the hotbar when refactoring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the fix. It does work and its implementation looks good, except for a few lines.
The merge conflict is caused by the same TouchScreenGUI compilation error fix that this PR proposes because the fix has been merged separately (7f9de5d). |
0768cba
to
8fc5f61
Compare
Co-authored-by: Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>
Co-authored-by: Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks good to me.
This PR fixes #13691.
Before this PR, TouchScreenGUI simply emitted a keypress event for one of the number keys when a hotbar item was pressed. After the 9th hotbar item (the last one for which there is a number key), it started pressing "random" keys.
After this PR, all hotbar items are selectable (except if they are hidden behind other controls, but that's a different issue).
To do
This PR is a Ready for Review.
How to test
Install the CI-built APK on your Android device. Start a Devtest world and execute
/hotbar 20
. Verify that you can select all hotbar slots. Verify that you cannot use the 19th hotbar slot to change your camera mode.Because I rebased this PR, you'll experience #13743 while testing.