From 326eeca306f7bfb53ae3685eef18978dd81e587e Mon Sep 17 00:00:00 2001 From: Muhammad Rifqi Priyo Susanto Date: Wed, 11 Apr 2018 03:55:17 +0700 Subject: Android: Replace movement buttons with joystick (#7126) * Android: Replace movement buttons with joystick Replace movement control buttons (arrows at bottom left screen) with virtual joystick. Joystick has 8 directions (same as keyboard). Basically, just map it to keyboard input. Joystick applies only on left 1/3 of screen. Joystick's position can be fixed by enabling fixed_virtual_joystick setting. Three new images: (1) placeholder joystick, (2) joystick container (background), and (3) joystick cursor. Remove unused images: movement control buttons (*_arrow.png). New data type: touch_gui_joystick_move_id Joystick's fixed position is spaced one button size from bottom and from left of screen. Remove unused variable: m_joystick_downlocation --- builtin/settingtypes.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'builtin') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 99febe1ef..080a57888 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -118,6 +118,13 @@ random_input (Random input) bool false # Continuous forward movement, toggled by autoforward key. continuous_forward (Continuous forward) bool false +# The length in pixels it takes for touch screen interaction to start. +touchscreen_threshold (Touch screen threshold) int 20 0 100 + +# (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 + # Enable joysticks enable_joysticks (Enable joysticks) bool false -- cgit v1.2.3