]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/gui/touchscreengui.h
Correct the checkbox selection box position (#8246)
[dragonfireclient.git] / src / gui / touchscreengui.h
index d3ce8492949860663f9a7217e7429922958bdf1c..1f9adda2204bdcb7b98b4cb17b8dd71a4194efd9 100644 (file)
@@ -27,16 +27,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <vector>
 
 #include "client/tile.h"
-#include "game.h"
+#include "client/game.h"
 
 using namespace irr;
 using namespace irr::core;
 using namespace irr::gui;
 
-typedef enum {
+typedef enum
+{
        jump_id = 0,
        crunch_id,
        zoom_id,
+       special1_id,
        after_last_element_id,
        settings_starter_id,
        rare_controls_starter_id,
@@ -60,9 +62,17 @@ 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 {
+typedef enum
+{
+       j_forward = 0,
+       j_backward,
+       j_left,
+       j_right,
+       j_special1
+} touch_gui_joystick_move_id;
+
+typedef enum
+{
        AHBB_Dir_Top_Bottom,
        AHBB_Dir_Bottom_Top,
        AHBB_Dir_Left_Right,
@@ -74,7 +84,7 @@ typedef enum {
 #define BUTTON_REPEAT_DELAY 0.2f
 
 #define SETTINGS_BAR_Y_OFFSET 5
-#define RARE_CONTROLS_BAR_Y_OFFSET 4
+#define RARE_CONTROLS_BAR_Y_OFFSET 5
 
 extern const char **touchgui_button_imagenames;
 extern const char **touchgui_joystick_imagenames;
@@ -206,9 +216,9 @@ class TouchScreenGUI
        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 +237,7 @@ class TouchScreenGUI
        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;