diff options
author | Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com> | 2022-09-30 01:30:33 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-29 20:30:33 +0200 |
commit | 3978b9b8ed1c318c3f9a088beb331c26bca6de6b (patch) | |
tree | 1745718c8c7995ac6fdcaa2b7acf356c86506a2c /builtin | |
parent | b1233056b76aa803123cc304d323887ad5fdfbae (diff) | |
download | minetest-3978b9b8ed1c318c3f9a088beb331c26bca6de6b.tar.xz |
Add crosshair support for Android (#7865)
If enabled, a crosshair will be shown to select object.
This will give Android players a way to play like they play on desktop.
On third-person back camera mode, player is forced to use crosshair.
On third-person front camera mode, player is unable to select anything.
Co-authored-by: ROllerozxa <temporaryemail4meh+github@gmail.com>
Co-authored-by: rubenwardy <rw@rubenwardy.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/mainmenu/tab_settings.lua | 4 | ||||
-rw-r--r-- | builtin/settingtypes.txt | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/builtin/mainmenu/tab_settings.lua b/builtin/mainmenu/tab_settings.lua index 21c77aa8e..ec2d7b1f5 100644 --- a/builtin/mainmenu/tab_settings.lua +++ b/builtin/mainmenu/tab_settings.lua @@ -308,10 +308,6 @@ local function handle_settings_buttons(this, fields, tabname, tabdata) core.show_keys_menu() return true end - if fields["cb_touchscreen_target"] then - core.settings:set("touchtarget", fields["cb_touchscreen_target"]) - return true - end --Note dropdowns have to be handled LAST! local ddhandled = false diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 7376c0cb7..91cc3ec32 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -117,6 +117,10 @@ mouse_sensitivity (Mouse sensitivity) float 0.2 0.001 10.0 # The length in pixels it takes for touch screen interaction to start. touchscreen_threshold (Touch screen threshold) int 20 0 100 +# Use crosshair to select object instead of whole screen. +# If enabled, a crosshair will be shown and will be used for selecting object. +touch_use_crosshair (Use crosshair for touch screen) bool false + # (Android) Fixes the position of virtual joystick. # If disabled, virtual joystick will center to first-touch's position. fixed_virtual_joystick (Fixed virtual joystick) bool false |