TouchControls: Implement an option for dig/place buttons#15845
Conversation
|
This is a great addition! Any idea where the issue is? Might be my gradle installation or something like that |
|
@maplemedley this is caused by luanti-org/luanti_android_deps@6819d1f in combination with the fact that this PR has not been rebased on top of eb79a76 yet. Rebased now, should be fixed. If it still doesn't work, you could also try running |
|
Thank you that worked I tested the new features out on my phone and it all works as expected! It feels surprisingly snappy to use the direct dig/place buttons The layout is also preserved when you switch away from and back to the new input mode. Didn't try upgrading from an earlier version though. |
|
This is a Great Idea! I also have another suggestion for the "Tap" Mode, It's better to have a TOUCH INDICATOR, similarly Minecraft PE has a similar feature and it appears as a Circle, which everybody knows whats this. But this TOUCH INDICATOR could help navigating around more easier, and maybe reducing the need for a System(Device) Touch Indicator. |
y5nw
left a comment
There was a problem hiding this comment.
Rebase needed. Makes sense and works (tested with a convertible) otherwise.
The place/dig buttons could be improved, but IMO this can be done in a followup.
It might be hard to make better textures while keeping them game-agnostic. Good icons would need to have some meaning to them, but the meaning of the buttons can differ wildly in different contexts (LMB = dig a node, punch someone, shoot a gun, press a button, ..; for all of these, there are different suitable icons). Luckily games and texture packs can override the button textures (at least statically), so we can also defer this to them. |
|
What if there's also a 4th option of Allowing to use The Button CROSSHAIR, while also interacting with TAP without Crosshair, it's kind of like a 2-in-1 Option, and its Also, it kinda would be nice if the Punch BUTTON or the RMB can be swippable and at the same time when you swipe it, it also swipe the screen view Which is the reason for that thing, since its more convinient using the Button, it feels kinda rough using it that way, even Mobile FPS game has this option tho, so why not? |
meant to resolve #13229
This PR adds the option to have dig/place buttons as a part of the touchscreen layout, instead of using long/short tap gestures for digging/placing. The biggest advantage is probably that the buttons allow for precise timing.
This PR introduces three different "modes" for the touch controls (new setting
touch_interaction_style):touch_use_crosshair = false)Long/short tap anywhere on the screen to interact. Interaction happens at finger position.
touch_use_crosshair = true)Long/short tap anywhere on the screen to interact. Interaction happens at crosshair position.
Use dedicated dig/place buttons to interact. Interaction happens at crosshair position.
Adding an option for dig/place buttons and framing the different control schemes as "modes" (as an enumeration) in the settings was inspired by Minecraft's mobile version.
Video demo of the three modes (the new mode is at the end):
b5.mp4
To do
This PR is a Ready for Review.
Note: ~300 of the ~530 added lines in this PR are the new SVG icons.
How to test
To have some fun, you could try the new control scheme in Block League on the A.E.S. server