#include <touchscreengui.h>
|
void | toggleOverflowMenu () |
|
void | updateVisibility () |
|
void | releaseAll () |
|
void | addButton (std::vector< button_info > &buttons, touch_gui_button_id id, const std::string &image, const recti &rect, bool visible=true) |
|
void | addToggleButton (std::vector< button_info > &buttons, touch_gui_button_id id, const std::string &image_1, const std::string &image_2, const recti &rect, bool visible=true) |
|
IGUIImage * | makeButtonDirect (touch_gui_button_id id, const recti &rect, bool visible) |
|
bool | isHotbarButton (const SEvent &event) |
|
void | handleReleaseEvent (size_t pointer_id) |
|
void | applyJoystickStatus () |
|
v2s32 | getPointerPos () |
|
void | emitMouseEvent (EMOUSE_INPUT_EVENT type) |
|
◆ TouchScreenGUI()
References addButton(), addToggleButton(), ARRLEN, aux1_id, button_image_names, button_titles, camera_id, chat_id, debug_id, drop_id, exit_id, fast_id, fly_id, g_settings, Settings::getBool(), RenderingEngine::getDisplayDensity(), Settings::getFloat(), Settings::getU16(), grab_gui_element(), id_to_keycode(), inventory_id, joystick_bg_id, joystick_center_id, joystick_off_id, jump_id, m_button_size, m_buttons, m_device, m_fixed_joystick, m_guienv, m_joystick_btn_bg, m_joystick_btn_center, m_joystick_btn_off, m_joystick_triggers_aux1, m_long_tap_delay, m_overflow_bg, m_overflow_btn, m_overflow_button_rects, m_overflow_button_titles, m_overflow_buttons, m_screensize, m_touchscreen_threshold, makeButtonDirect(), minimap_id, MYMIN, noclip_id, overflow_id, range_id, sneak_id, toggle_chat_id, wstrgettext(), and zoom_id.
◆ addButton()
void TouchScreenGUI::addButton |
( |
std::vector< button_info > & | buttons, |
|
|
touch_gui_button_id | id, |
|
|
const std::string & | image, |
|
|
const recti & | rect, |
|
|
bool | visible = true ) |
|
private |
◆ addToggleButton()
void TouchScreenGUI::addToggleButton |
( |
std::vector< button_info > & | buttons, |
|
|
touch_gui_button_id | id, |
|
|
const std::string & | image_1, |
|
|
const std::string & | image_2, |
|
|
const recti & | rect, |
|
|
bool | visible = true ) |
|
private |
◆ applyContextControls()
References emitMouseEvent(), porting::getTimeMs(), LongTap, m_dig_pressed, m_dig_pressed_until, m_last_mode, m_place_pressed, m_place_pressed_until, m_tap_state, None, sanity_check, SHORT_DIG_LONG_PLACE, ShortTap, SIMULATED_CLICK_DURATION_MS, and TouchInteractionMode_USER.
Referenced by Game::processPlayerInteraction().
◆ applyJoystickStatus()
void TouchScreenGUI::applyJoystickStatus |
( |
| ) |
|
|
private |
◆ emitMouseEvent()
void TouchScreenGUI::emitMouseEvent |
( |
EMOUSE_INPUT_EVENT | type | ) |
|
|
private |
◆ getHotbarSelection()
std::optional< u16 > TouchScreenGUI::getHotbarSelection |
( |
| ) |
|
◆ getMovementDirection()
float TouchScreenGUI::getMovementDirection |
( |
| ) |
|
|
inline |
◆ getMovementSpeed()
float TouchScreenGUI::getMovementSpeed |
( |
| ) |
|
|
inline |
◆ getPitchChange()
double TouchScreenGUI::getPitchChange |
( |
| ) |
|
|
inline |
◆ getPointerPos()
v2s32 TouchScreenGUI::getPointerPos |
( |
| ) |
|
|
private |
◆ getShootline()
line3d< f32 > TouchScreenGUI::getShootline |
( |
| ) |
|
|
inline |
Returns a line which describes what the player is pointing at.
The starting point and looking direction are significant, the line should be scaled to match its length to the actual distance the player can reach. The line starts at the camera and ends on the camera's far plane. The coordinates do not contain the camera offset.
References m_shootline.
Referenced by Game::processPlayerInteraction().
◆ getYawChange()
double TouchScreenGUI::getYawChange |
( |
| ) |
|
|
inline |
◆ handleReleaseEvent()
void TouchScreenGUI::handleReleaseEvent |
( |
size_t | pointer_id | ) |
|
|
private |
References applyJoystickStatus(), buttons_handleRelease(), infostream, LongTap, m_buttons, m_device, m_has_joystick_id, m_has_move_id, m_joystick_btn_bg, m_joystick_btn_center, m_joystick_btn_off, m_joystick_direction, m_joystick_id, m_joystick_speed, m_joystick_status_aux1, m_move_has_really_moved, m_move_id, m_move_prevent_short_tap, m_overflow_buttons, m_overflow_open, m_pointer_downpos, m_pointer_pos, m_receiver, m_tap_state, m_texturesource, None, and ShortTap.
Referenced by releaseAll(), and translateEvent().
◆ hide()
void TouchScreenGUI::hide |
( |
| ) |
|
◆ isHotbarButton()
bool TouchScreenGUI::isHotbarButton |
( |
const SEvent & | event | ) |
|
|
private |
◆ makeButtonDirect()
IGUIImage * TouchScreenGUI::makeButtonDirect |
( |
touch_gui_button_id | id, |
|
|
const recti & | rect, |
|
|
bool | visible ) |
|
private |
◆ registerHotbarRect()
void TouchScreenGUI::registerHotbarRect |
( |
u16 | index, |
|
|
const recti & | rect ) |
◆ releaseAll()
void TouchScreenGUI::releaseAll |
( |
| ) |
|
|
private |
◆ resetHotbarRects()
void TouchScreenGUI::resetHotbarRects |
( |
| ) |
|
◆ setUseCrosshair()
void TouchScreenGUI::setUseCrosshair |
( |
bool | use_crosshair | ) |
|
|
inline |
◆ setVisible()
void TouchScreenGUI::setVisible |
( |
bool | visible | ) |
|
◆ show()
void TouchScreenGUI::show |
( |
| ) |
|
◆ step()
void TouchScreenGUI::step |
( |
float | dtime | ) |
|
References applyJoystickStatus(), buttons_step(), porting::getDeltaMs(), getPointerPos(), porting::getTimeMs(), LongTap, m_buttons, m_device, m_draw_crosshair, m_had_move_id, m_has_move_id, m_long_tap_delay, m_move_downtime, m_move_has_really_moved, m_overflow_buttons, m_overflow_open, m_receiver, m_shootline, m_tap_state, m_texturesource, and None.
Referenced by Game::processUserInput().
◆ toggleOverflowMenu()
void TouchScreenGUI::toggleOverflowMenu |
( |
| ) |
|
|
private |
◆ translateEvent()
void TouchScreenGUI::translateEvent |
( |
const SEvent & | event | ) |
|
References buttons_handlePress(), dir(), g_settings, RenderingEngine::getDisplayDensity(), Settings::getFloat(), porting::getTimeMs(), handleReleaseEvent(), infostream, isHotbarButton(), m_button_size, m_buttons, m_camera_pitch_change, m_camera_yaw_change, m_device, m_fixed_joystick, m_guienv, m_had_move_id, m_has_joystick_id, m_has_move_id, m_joystick_btn_bg, m_joystick_btn_center, m_joystick_btn_off, m_joystick_direction, m_joystick_has_really_moved, m_joystick_id, m_joystick_speed, m_joystick_status_aux1, m_move_downtime, m_move_has_really_moved, m_move_id, m_move_pos, m_move_prevent_short_tap, m_overflow_btn, m_overflow_button_rects, m_overflow_buttons, m_overflow_open, m_pointer_downpos, m_pointer_pos, m_receiver, m_screensize, m_texturesource, m_touchscreen_threshold, m_visible, toggleOverflowMenu(), and verbosestream.
Referenced by MyEventReceiver::OnEvent().
◆ updateVisibility()
void TouchScreenGUI::updateVisibility |
( |
| ) |
|
|
private |
◆ m_button_size
s32 TouchScreenGUI::m_button_size |
|
private |
◆ m_buttons
◆ m_camera_pitch_change
double TouchScreenGUI::m_camera_pitch_change = 0.0 |
|
private |
◆ m_camera_yaw_change
double TouchScreenGUI::m_camera_yaw_change = 0.0 |
|
private |
◆ m_device
IrrlichtDevice* TouchScreenGUI::m_device = nullptr |
|
private |
◆ m_dig_pressed
bool TouchScreenGUI::m_dig_pressed = false |
|
private |
◆ m_dig_pressed_until
u64 TouchScreenGUI::m_dig_pressed_until = 0 |
|
private |
◆ m_draw_crosshair
bool TouchScreenGUI::m_draw_crosshair = false |
|
private |
◆ m_fixed_joystick
bool TouchScreenGUI::m_fixed_joystick = false |
|
private |
◆ m_guienv
IGUIEnvironment* TouchScreenGUI::m_guienv = nullptr |
|
private |
◆ m_had_move_id
bool TouchScreenGUI::m_had_move_id = false |
|
private |
◆ m_has_joystick_id
bool TouchScreenGUI::m_has_joystick_id = false |
|
private |
◆ m_has_move_id
bool TouchScreenGUI::m_has_move_id = false |
|
private |
◆ m_hotbar_rects
std::unordered_map<u16, recti> TouchScreenGUI::m_hotbar_rects |
|
private |
◆ m_hotbar_selection
std::optional<u16> TouchScreenGUI::m_hotbar_selection = std::nullopt |
|
private |
◆ m_joystick_btn_bg
std::shared_ptr<IGUIImage> TouchScreenGUI::m_joystick_btn_bg |
|
private |
◆ m_joystick_btn_center
std::shared_ptr<IGUIImage> TouchScreenGUI::m_joystick_btn_center |
|
private |
◆ m_joystick_btn_off
std::shared_ptr<IGUIImage> TouchScreenGUI::m_joystick_btn_off |
|
private |
◆ m_joystick_direction
float TouchScreenGUI::m_joystick_direction = 0.0f |
|
private |
◆ m_joystick_has_really_moved
bool TouchScreenGUI::m_joystick_has_really_moved = false |
|
private |
◆ m_joystick_id
size_t TouchScreenGUI::m_joystick_id |
|
private |
◆ m_joystick_speed
float TouchScreenGUI::m_joystick_speed = 0.0f |
|
private |
◆ m_joystick_status_aux1
bool TouchScreenGUI::m_joystick_status_aux1 = false |
|
private |
◆ m_joystick_triggers_aux1
bool TouchScreenGUI::m_joystick_triggers_aux1 = false |
|
private |
◆ m_last_mode
◆ m_long_tap_delay
u16 TouchScreenGUI::m_long_tap_delay |
|
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
size_t TouchScreenGUI::m_move_id |
|
private |
◆ m_move_pos
v2s32 TouchScreenGUI::m_move_pos |
|
private |
◆ m_move_prevent_short_tap
bool TouchScreenGUI::m_move_prevent_short_tap = false |
|
private |
◆ m_overflow_bg
std::shared_ptr<IGUIStaticText> TouchScreenGUI::m_overflow_bg |
|
private |
◆ m_overflow_btn
std::shared_ptr<IGUIImage> TouchScreenGUI::m_overflow_btn |
|
private |
◆ m_overflow_button_rects
std::vector<recti> TouchScreenGUI::m_overflow_button_rects |
|
private |
◆ m_overflow_button_titles
std::vector<std::shared_ptr<IGUIStaticText> > TouchScreenGUI::m_overflow_button_titles |
|
private |
◆ m_overflow_buttons
std::vector<button_info> TouchScreenGUI::m_overflow_buttons |
|
private |
◆ m_overflow_open
bool TouchScreenGUI::m_overflow_open = false |
|
private |
◆ m_place_pressed
bool TouchScreenGUI::m_place_pressed = false |
|
private |
◆ m_place_pressed_until
u64 TouchScreenGUI::m_place_pressed_until = 0 |
|
private |
◆ m_pointer_downpos
std::unordered_map<size_t, v2s32> TouchScreenGUI::m_pointer_downpos |
|
private |
◆ m_pointer_pos
std::unordered_map<size_t, v2s32> TouchScreenGUI::m_pointer_pos |
|
private |
◆ m_receiver
IEventReceiver* TouchScreenGUI::m_receiver = nullptr |
|
private |
◆ m_screensize
v2u32 TouchScreenGUI::m_screensize |
|
private |
◆ m_shootline
line3d<f32> TouchScreenGUI::m_shootline |
|
private |
A line starting at the camera and pointing towards the selected object.
The line ends on the camera's far plane. The coordinates do not contain the camera offset.
Referenced by getShootline(), and step().
◆ m_tap_state
◆ m_texturesource
◆ m_touchscreen_threshold
double TouchScreenGUI::m_touchscreen_threshold |
|
private |
◆ m_visible
bool TouchScreenGUI::m_visible = true |
|
private |
The documentation for this class was generated from the following files: