diff options
author | Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com> | 2018-07-11 05:33:40 +0700 |
---|---|---|
committer | Paramat <paramat@users.noreply.github.com> | 2018-07-10 23:33:40 +0100 |
commit | 7ebc229b0d2d59e367b8ba64a41535d79fdd4204 (patch) | |
tree | 04a7636198dfc8c36348e81c3f0962d03d18bc6d /src/gui/touchscreengui.h | |
parent | f7a8e757655034abf661c0fcb5129b9ddd798a0b (diff) | |
download | minetest-7ebc229b0d2d59e367b8ba64a41535d79fdd4204.tar.gz minetest-7ebc229b0d2d59e367b8ba64a41535d79fdd4204.tar.bz2 minetest-7ebc229b0d2d59e367b8ba64a41535d79fdd4204.zip |
Android: Add 'aux' button (#7477)
Add 'aux' button.
Use joystick to trigger 'aux' button when forward and out of main circle, by enabling
'virtual_joystick_triggers_aux' setting.
Diffstat (limited to 'src/gui/touchscreengui.h')
-rw-r--r-- | src/gui/touchscreengui.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gui/touchscreengui.h b/src/gui/touchscreengui.h index d3ce84929..5102f188b 100644 --- a/src/gui/touchscreengui.h +++ b/src/gui/touchscreengui.h @@ -37,6 +37,7 @@ typedef enum { jump_id = 0, crunch_id, zoom_id, + special1_id, after_last_element_id, settings_starter_id, rare_controls_starter_id, @@ -60,7 +61,13 @@ typedef enum { joystick_center_id } touch_gui_button_id; -typedef enum { j_forward = 0, j_backward, j_left, j_right } touch_gui_joystick_move_id; +typedef enum { + j_forward = 0, + j_backward, + j_left, + j_right, + j_special1 +} touch_gui_joystick_move_id; typedef enum { AHBB_Dir_Top_Bottom, @@ -206,9 +213,9 @@ private: double m_camera_pitch = 0.0; // forward, backward, left, right - touch_gui_button_id m_joystick_names[4] = { - forward_id, backward_id, left_id, right_id}; - bool m_joystick_status[4] = {false, false, false, false}; + touch_gui_button_id m_joystick_names[5] = { + forward_id, backward_id, left_id, right_id, special1_id}; + bool m_joystick_status[5] = {false, false, false, false, false}; /*! * A line starting at the camera and pointing towards the @@ -227,6 +234,7 @@ private: int m_joystick_id = -1; bool m_joystick_has_really_moved = false; bool m_fixed_joystick = false; + bool m_joystick_triggers_special1 = false; button_info *m_joystick_btn_off = nullptr; button_info *m_joystick_btn_bg = nullptr; button_info *m_joystick_btn_center = nullptr; |