22 #include <IEventReceiver.h>
23 #include <IGUIButton.h>
24 #include <IGUIEnvironment.h>
25 #include <IrrlichtDevice.h>
83 #define MIN_DIG_TIME_MS 500
84 #define BUTTON_REPEAT_DELAY 0.2f
85 #define SETTINGS_BAR_Y_OFFSET 5
86 #define RARE_CONTROLS_BAR_Y_OFFSET 5
89 #define SLOW_BUTTON_REPEAT 1.0f
99 std::vector<size_t>
ids;
100 IGUIButton *guibutton =
nullptr;
114 const v2s32 &UpperLeft,
const v2s32 &LowerRight,
121 const char *btn_image);
125 const char *btn_image_1,
const char *btn_image_2);
128 bool isButton(
const SEvent &event);
131 void step(
float dtime);
154 bool m_active =
false;
156 bool m_visible =
true;
159 float m_timeout = 0.0f;
160 float m_timeout_value = 3.0f;
161 bool m_initialized =
false;
171 void translateEvent(
const SEvent &event);
177 double res = m_camera_yaw_change;
178 m_camera_yaw_change = 0;
194 void step(
float dtime);
196 void registerHudItem(
int index,
const rect<s32> &rect);
197 void Toggle(
bool visible);
215 double m_camera_yaw_change = 0.0;
216 double m_camera_pitch = 0.0;
221 bool m_joystick_status[5] = {
false,
false,
false,
false,
false};
232 bool m_move_has_really_moved =
false;
233 u64 m_move_downtime = 0;
234 bool m_move_sent_as_mouse_event =
false;
237 int m_joystick_id = -1;
238 bool m_joystick_has_really_moved =
false;
239 bool m_fixed_joystick =
false;
240 bool m_joystick_triggers_special1 =
false;
254 void handleChangedButton(
const SEvent &event);
258 const std::wstring &caption,
bool immediate_release,
263 const rect<s32> &button_rect,
int texture_id,
264 bool visible =
true);
280 bool isHUDButton(
const SEvent &event);
283 bool doubleTapDetection();
286 void handleReleaseEvent(
size_t evt_id);
289 void applyJoystickStatus();
static v2f dir(const v2f &pos_dist)
Definition: camera.cpp:240
Definition: touchscreengui.h:166
double getYawChange()
Definition: touchscreengui.h:175
std::map< size_t, v2s32 > m_pointerpos
Definition: touchscreengui.h:300
std::map< int, rect< s32 > > m_hud_rects
Definition: touchscreengui.h:210
AutoHideButtonBar m_settingsbar
Definition: touchscreengui.h:306
double getPitch()
Definition: touchscreengui.h:182
double m_touchscreen_threshold
Definition: touchscreengui.h:209
s32 button_size
Definition: touchscreengui.h:208
ISimpleTextureSource * m_texturesource
Definition: touchscreengui.h:206
IEventReceiver * m_receiver
Definition: touchscreengui.h:205
IrrlichtDevice * m_device
Definition: touchscreengui.h:203
IGUIEnvironment * m_guienv
Definition: touchscreengui.h:204
std::map< size_t, irr::EKEY_CODE > m_hud_ids
Definition: touchscreengui.h:211
AutoHideButtonBar m_rarecontrolsbar
Definition: touchscreengui.h:309
v2u32 m_screensize
Definition: touchscreengui.h:207
bool m_visible
Definition: touchscreengui.h:212
std::vector< id_status > m_known_ids
Definition: touchscreengui.h:274
line3d< f32 > getShootline()
Definition: touchscreengui.h:192
line3d< f32 > m_shootline
Definition: touchscreengui.h:229
core::vector2d< s32 > v2s32
Definition: irr_v2d.h:28
core::vector2d< u32 > v2u32
Definition: irr_v2d.h:29
Definition: irrUString.h:99
Definition: intlGUIEditBox.cpp:56
Definition: touchscreengui.h:267
int X
Definition: touchscreengui.h:269
int Y
Definition: touchscreengui.h:270
size_t id
Definition: touchscreengui.h:268
Definition: touchscreengui.h:293
s32 y
Definition: touchscreengui.h:296
u64 down_time
Definition: touchscreengui.h:294
s32 x
Definition: touchscreengui.h:295
touch_gui_joystick_move_id
Definition: touchscreengui.h:67
@ j_backward
Definition: touchscreengui.h:69
@ j_forward
Definition: touchscreengui.h:68
@ j_special1
Definition: touchscreengui.h:72
@ j_right
Definition: touchscreengui.h:71
@ j_left
Definition: touchscreengui.h:70
const char ** button_imagenames
Definition: touchscreengui.cpp:39
const char ** joystick_imagenames
Definition: touchscreengui.cpp:46
touch_gui_button_id
Definition: touchscreengui.h:38
@ joystick_center_id
Definition: touchscreengui.h:63
@ fast_id
Definition: touchscreengui.h:48
@ chat_id
Definition: touchscreengui.h:54
@ after_last_element_id
Definition: touchscreengui.h:43
@ rare_controls_starter_id
Definition: touchscreengui.h:45
@ special1_id
Definition: touchscreengui.h:42
@ settings_starter_id
Definition: touchscreengui.h:44
@ inventory_id
Definition: touchscreengui.h:55
@ debug_id
Definition: touchscreengui.h:49
@ forward_id
Definition: touchscreengui.h:57
@ range_id
Definition: touchscreengui.h:51
@ zoom_id
Definition: touchscreengui.h:41
@ fly_id
Definition: touchscreengui.h:46
@ minimap_id
Definition: touchscreengui.h:52
@ crunch_id
Definition: touchscreengui.h:40
@ camera_id
Definition: touchscreengui.h:50
@ drop_id
Definition: touchscreengui.h:56
@ right_id
Definition: touchscreengui.h:60
@ jump_id
Definition: touchscreengui.h:39
@ joystick_off_id
Definition: touchscreengui.h:61
@ toggle_chat_id
Definition: touchscreengui.h:53
@ left_id
Definition: touchscreengui.h:59
@ joystick_bg_id
Definition: touchscreengui.h:62
@ backward_id
Definition: touchscreengui.h:58
@ noclip_id
Definition: touchscreengui.h:47
TouchScreenGUI * g_touchscreengui
Definition: touchscreengui.cpp:120
#define BUTTON_REPEAT_DELAY
Definition: touchscreengui.h:84
autohide_button_bar_dir
Definition: touchscreengui.h:76
@ AHBB_Dir_Left_Right
Definition: touchscreengui.h:79
@ AHBB_Dir_Right_Left
Definition: touchscreengui.h:80
@ AHBB_Dir_Bottom_Top
Definition: touchscreengui.h:78
@ AHBB_Dir_Top_Bottom
Definition: touchscreengui.h:77