]> git.lizzy.rs Git - dragonfireclient.git/commit
Android: Replace movement buttons with joystick (#7126)
authorMuhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>
Tue, 10 Apr 2018 20:55:17 +0000 (03:55 +0700)
committerSmallJoker <SmallJoker@users.noreply.github.com>
Tue, 10 Apr 2018 20:55:17 +0000 (22:55 +0200)
commit326eeca306f7bfb53ae3685eef18978dd81e587e
treed2a8b68eae06ed2982e8fed2562783a432dc7171
parent22ebbe136a8a90bc23d7f910a3dee5bf41632115
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
12 files changed:
builtin/settingtypes.txt
minetest.conf.example
src/defaultsettings.cpp
src/gui/touchscreengui.cpp
src/gui/touchscreengui.h
textures/base/pack/down_arrow.png [deleted file]
textures/base/pack/joystick_bg.png [new file with mode: 0755]
textures/base/pack/joystick_center.png [new file with mode: 0755]
textures/base/pack/joystick_off.png [new file with mode: 0755]
textures/base/pack/left_arrow.png [deleted file]
textures/base/pack/right_arrow.png [deleted file]
textures/base/pack/up_arrow.png [deleted file]