#include <touchscreengui.h>
|
touch_gui_button_id | getButtonID (s32 x, s32 y) |
|
touch_gui_button_id | getButtonID (size_t eventID) |
|
void | handleChangedButton (const SEvent &event) |
|
void | initButton (touch_gui_button_id id, const rect< s32 > &button_rect, const std::wstring &caption, bool immediate_release, float repeat_delay=BUTTON_REPEAT_DELAY) |
|
button_info * | initJoystickButton (touch_gui_button_id id, const rect< s32 > &button_rect, int texture_id, bool visible=true) |
|
void | handleButtonEvent (touch_gui_button_id bID, size_t eventID, bool action) |
|
bool | isHUDButton (const SEvent &event) |
|
bool | doubleTapDetection () |
|
void | handleReleaseEvent (size_t evt_id) |
|
void | applyJoystickStatus () |
|
◆ TouchScreenGUI()
TouchScreenGUI::TouchScreenGUI |
( |
IrrlichtDevice * |
device, |
|
|
IEventReceiver * |
receiver |
|
) |
| |
References BUTTON_REPEAT_DELAY, button_size, g_settings, Settings::getBool(), porting::getDisplayDensity(), Settings::getFloat(), Settings::getU16(), m_buttons, m_device, m_fixed_joystick, m_joystick_triggers_special1, m_screensize, m_touchscreen_threshold, and MYMIN.
◆ ~TouchScreenGUI()
TouchScreenGUI::~TouchScreenGUI |
( |
| ) |
|
◆ applyJoystickStatus()
void TouchScreenGUI::applyJoystickStatus |
( |
| ) |
|
|
private |
◆ doubleTapDetection()
bool TouchScreenGUI::doubleTapDetection |
( |
| ) |
|
|
private |
References TouchScreenGUI::key_event::down_time, porting::getDeltaMs(), porting::getTimeMs(), m_device, m_key_events, m_move_downlocation, m_move_downtime, m_receiver, m_shootline, m_touchscreen_threshold, verbosestream, TouchScreenGUI::key_event::x, and TouchScreenGUI::key_event::y.
Referenced by handleReleaseEvent().
◆ getButtonID() [1/2]
◆ getButtonID() [2/2]
◆ getPitch()
double TouchScreenGUI::getPitch |
( |
| ) |
|
|
inline |
◆ getShootline()
line3d<f32> TouchScreenGUI::getShootline |
( |
| ) |
|
|
inline |
◆ getYawChange()
double TouchScreenGUI::getYawChange |
( |
| ) |
|
|
inline |
◆ handleButtonEvent()
void TouchScreenGUI::handleButtonEvent |
( |
touch_gui_button_id |
bID, |
|
|
size_t |
eventID, |
|
|
bool |
action |
|
) |
| |
|
private |
◆ handleChangedButton()
void TouchScreenGUI::handleChangedButton |
( |
const SEvent & |
event | ) |
|
|
private |
◆ handleReleaseEvent()
void TouchScreenGUI::handleReleaseEvent |
( |
size_t |
evt_id | ) |
|
|
private |
References after_last_element_id, applyJoystickStatus(), doubleTapDetection(), getButtonID(), button_info::guibutton, handleButtonEvent(), infostream, m_joystick_btn_bg, m_joystick_btn_center, m_joystick_btn_off, m_joystick_id, m_joystick_status, m_known_ids, m_move_downlocation, m_move_id, m_move_sent_as_mouse_event, and m_receiver.
Referenced by Toggle(), and translateEvent().
◆ hide()
void TouchScreenGUI::hide |
( |
| ) |
|
◆ init()
References AutoHideButtonBar::addButton(), AutoHideButtonBar::addToggleButton(), AHBB_Dir_Left_Right, AHBB_Dir_Right_Left, button_size, camera_id, chat_id, crunch_id, debug_id, drop_id, fast_id, fly_id, AutoHideButtonBar::init(), initButton(), initJoystickButton(), inventory_id, joystick_bg_id, joystick_center_id, joystick_off_id, jump_id, m_fixed_joystick, m_joystick_btn_bg, m_joystick_btn_center, m_joystick_btn_off, m_joystick_triggers_special1, m_rarecontrolsbar, m_screensize, m_settingsbar, m_texturesource, m_visible, minimap_id, noclip_id, range_id, RARE_CONTROLS_BAR_Y_OFFSET, rare_controls_starter_id, SETTINGS_BAR_Y_OFFSET, settings_starter_id, special1_id, toggle_chat_id, and zoom_id.
Referenced by Game::createClient().
◆ initButton()
References button_imagenames, button_info::guibutton, id2keycode(), button_info::ids, button_info::immediate_release, button_info::keycode, load_button_texture(), m_buttons, m_device, m_guienv, m_texturesource, button_info::repeatcounter, and button_info::repeatdelay.
Referenced by init().
◆ initJoystickButton()
◆ isHUDButton()
bool TouchScreenGUI::isHUDButton |
( |
const SEvent & |
event | ) |
|
|
private |
◆ registerHudItem()
void TouchScreenGUI::registerHudItem |
( |
int |
index, |
|
|
const rect< s32 > & |
rect |
|
) |
| |
◆ resetHud()
void TouchScreenGUI::resetHud |
( |
| ) |
|
◆ show()
void TouchScreenGUI::show |
( |
| ) |
|
◆ step()
void TouchScreenGUI::step |
( |
float |
dtime | ) |
|
References applyJoystickStatus(), porting::getDeltaMs(), porting::getTimeMs(), m_buttons, m_device, m_joystick_status, m_move_downlocation, m_move_downtime, m_move_has_really_moved, m_move_id, m_move_sent_as_mouse_event, m_rarecontrolsbar, m_receiver, m_settingsbar, m_shootline, MIN_DIG_TIME_MS, AutoHideButtonBar::step(), and verbosestream.
Referenced by Game::processUserInput().
◆ Toggle()
void TouchScreenGUI::Toggle |
( |
bool |
visible | ) |
|
References button_info::guibutton, handleReleaseEvent(), AutoHideButtonBar::hide(), m_buttons, m_joystick_btn_off, m_known_ids, m_rarecontrolsbar, m_settingsbar, m_visible, and AutoHideButtonBar::show().
Referenced by hide(), and show().
◆ translateEvent()
void TouchScreenGUI::translateEvent |
( |
const SEvent & |
event | ) |
|
References after_last_element_id, button_size, AutoHideButtonBar::deactivate(), g_settings, getButtonID(), Settings::getFloat(), porting::getTimeMs(), button_info::guibutton, handleButtonEvent(), handleChangedButton(), handleReleaseEvent(), TouchScreenGUI::id_status::id, infostream, AutoHideButtonBar::isButton(), isHUDButton(), j_backward, j_forward, j_left, j_right, j_special1, m_camera_pitch, m_camera_yaw_change, m_device, m_fixed_joystick, m_joystick_btn_bg, m_joystick_btn_center, m_joystick_btn_off, m_joystick_has_really_moved, m_joystick_id, m_joystick_status, m_known_ids, m_move_downlocation, m_move_downtime, m_move_has_really_moved, m_move_id, m_move_sent_as_mouse_event, m_pointerpos, m_rarecontrolsbar, m_screensize, m_settingsbar, m_shootline, m_touchscreen_threshold, m_visible, MYMAX, MYMIN, and verbosestream.
◆ button_size
s32 TouchScreenGUI::button_size |
|
private |
◆ m_buttons
◆ m_camera_pitch
double TouchScreenGUI::m_camera_pitch = 0.0 |
|
private |
◆ m_camera_yaw_change
double TouchScreenGUI::m_camera_yaw_change = 0.0 |
|
private |
◆ m_device
IrrlichtDevice* TouchScreenGUI::m_device |
|
private |
◆ m_fixed_joystick
bool TouchScreenGUI::m_fixed_joystick = false |
|
private |
◆ m_guienv
IGUIEnvironment* TouchScreenGUI::m_guienv |
|
private |
◆ m_hud_ids
std::map<size_t, irr::EKEY_CODE> TouchScreenGUI::m_hud_ids |
|
private |
◆ m_hud_rects
std::map<int, rect<s32> > TouchScreenGUI::m_hud_rects |
|
private |
◆ m_joystick_btn_bg
button_info* TouchScreenGUI::m_joystick_btn_bg = nullptr |
|
private |
◆ m_joystick_btn_center
button_info* TouchScreenGUI::m_joystick_btn_center = nullptr |
|
private |
◆ m_joystick_btn_off
button_info* TouchScreenGUI::m_joystick_btn_off = nullptr |
|
private |
◆ m_joystick_has_really_moved
bool TouchScreenGUI::m_joystick_has_really_moved = false |
|
private |
◆ m_joystick_id
int TouchScreenGUI::m_joystick_id = -1 |
|
private |
◆ m_joystick_names
Initial value:= {
@ special1_id
Definition: touchscreengui.h:42
@ forward_id
Definition: touchscreengui.h:57
@ right_id
Definition: touchscreengui.h:60
@ left_id
Definition: touchscreengui.h:59
@ backward_id
Definition: touchscreengui.h:58
Referenced by applyJoystickStatus().
◆ m_joystick_status
bool TouchScreenGUI::m_joystick_status[5] = {false, false, false, false, false} |
|
private |
◆ m_joystick_triggers_special1
bool TouchScreenGUI::m_joystick_triggers_special1 = false |
|
private |
◆ m_key_events
◆ m_known_ids
std::vector<id_status> TouchScreenGUI::m_known_ids |
|
private |
◆ m_move_downlocation
v2s32 TouchScreenGUI::m_move_downlocation = v2s32(-10000, -10000) |
|
private |
◆ m_move_downtime
u64 TouchScreenGUI::m_move_downtime = 0 |
|
private |
◆ m_move_has_really_moved
bool TouchScreenGUI::m_move_has_really_moved = false |
|
private |
◆ m_move_id
int TouchScreenGUI::m_move_id = -1 |
|
private |
◆ m_move_sent_as_mouse_event
bool TouchScreenGUI::m_move_sent_as_mouse_event = false |
|
private |
◆ m_pointerpos
std::map<size_t, v2s32> TouchScreenGUI::m_pointerpos |
|
private |
◆ m_rarecontrolsbar
◆ m_receiver
IEventReceiver* TouchScreenGUI::m_receiver |
|
private |
◆ m_screensize
v2u32 TouchScreenGUI::m_screensize |
|
private |
◆ m_settingsbar
◆ m_shootline
line3d<f32> TouchScreenGUI::m_shootline |
|
private |
◆ m_texturesource
◆ m_touchscreen_threshold
double TouchScreenGUI::m_touchscreen_threshold |
|
private |
◆ m_visible
bool TouchScreenGUI::m_visible |
|
private |
The documentation for this class was generated from the following files: