1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

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
This commit is contained in:
Muhammad Rifqi Priyo Susanto 2018-04-11 03:55:17 +07:00 committed by SmallJoker
parent 22ebbe136a
commit 326eeca306
12 changed files with 339 additions and 121 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B