Better navigation in Vanilla screens
Lampshade2278 opened this issue ยท 7 comments
Something that's bugging me is that when scrolling through options in the esc menu, instead of working like a matrix, (you scroll up, down, left, or right and the selection moves as such) it works more like pressing the tab button. Could this be changed in future versions, so that menu navigation could be more streamlined, or is there a reason that the current functionality is preferred?
That's sadly not possible, due to the Minecraft GUI system just not providing any way of navigating left and right.
I could theoretically hardcode this behavior, but there would likely be conflicts with other mods adding their own buttons to the screen.
I would ask if maybe you could simply make the left stick move the cursor like it does in the inventory, but I assume it may still be a limitation of the GUI system as I was oddly enough able to move the cursor around in the resource packs screen?
I would ask if maybe you could simply make the left stick move the cursor like it does in the inventory, but I assume it may still be a limitation of the GUI system as I was oddly enough able to move the cursor around in the resource packs screen?
You can configure screens in which the left stick behaves like a mouse in the advanced config under the option "Mouse Screens" (just add "net.minecraft" to include all vanilla screens). The resourcepack selection screen is in there by default, as it works way better with a cursor.
That's sadly not possible, due to the Minecraft GUI system just not providing any way of navigating left and right. I could theoretically hardcode this behavior, but there would likely be conflicts with other mods adding their own buttons to the screen.
It could be implemented without hardcoding by finding the nearest button positioned relatively in the pressed direction - falling back to using the vanilla tab order if no sensible button is found. Since this cannot always be perfect, an interface would improve this - perhaps implemented in vanilla screens using mixins.
Mod authors could also implement this, although it would cause errors finding the classes unless something clever was done.
Just an idea, I don't how well it would work in practice. Yes, I know I'm a few months late. I saw AntVenom's video just now which mentioned this issue which got me thinking.
Since 23w03a introduced arrow key navigation, should it now be as simple as binding the left stick to the arrow keys for vanilla screens once 1.19.4 releases?
If you can do it without the mod then it should be possible - even easier - for the mod to implement it.