Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
touchcontrols.cpp File Reference
#include "touchcontrols.h"
#include "touchscreenlayout.h"
#include "gettime.h"
#include "irr_v2d.h"
#include "log.h"
#include "porting.h"
#include "settings.h"
#include "client/guiscalingfilter.h"
#include "client/keycode.h"
#include "client/renderingengine.h"
#include "client/texturesource.h"
#include "util/numeric.h"
#include "irr_gui_ptr.h"
#include "IGUIImage.h"
#include "IGUIStaticText.h"
#include "IGUIFont.h"
#include <IrrlichtDevice.h>
#include <ISceneCollisionManager.h>
#include <iostream>
#include <algorithm>
+ Include dependency graph for touchcontrols.cpp:

Functions

static void load_button_texture (IGUIImage *gui_button, const std::string &path, const recti &button_rect, ISimpleTextureSource *tsrc, video::IVideoDriver *driver)
 
static bool buttons_handlePress (std::vector< button_info > &buttons, size_t pointer_id, IGUIElement *element, video::IVideoDriver *driver, IEventReceiver *receiver, ISimpleTextureSource *tsrc)
 
static bool buttons_handleRelease (std::vector< button_info > &buttons, size_t pointer_id, video::IVideoDriver *driver, IEventReceiver *receiver, ISimpleTextureSource *tsrc)
 
static bool buttons_step (std::vector< button_info > &buttons, float dtime, video::IVideoDriver *driver, IEventReceiver *receiver, ISimpleTextureSource *tsrc)
 
static EKEY_CODE id_to_keycode (touch_gui_button_id id)
 

Variables

TouchControlsg_touchcontrols
 

Function Documentation

◆ buttons_handlePress()

static bool buttons_handlePress ( std::vector< button_info > & buttons,
size_t pointer_id,
IGUIElement * element,
video::IVideoDriver * driver,
IEventReceiver * receiver,
ISimpleTextureSource * tsrc )
static

References BUTTON_REPEAT_DELAY.

Referenced by TouchControls::translateEvent().

+ Here is the caller graph for this function:

◆ buttons_handleRelease()

static bool buttons_handleRelease ( std::vector< button_info > & buttons,
size_t pointer_id,
video::IVideoDriver * driver,
IEventReceiver * receiver,
ISimpleTextureSource * tsrc )
static

Referenced by TouchControls::handleReleaseEvent().

+ Here is the caller graph for this function:

◆ buttons_step()

static bool buttons_step ( std::vector< button_info > & buttons,
float dtime,
video::IVideoDriver * driver,
IEventReceiver * receiver,
ISimpleTextureSource * tsrc )
static

References BUTTON_REPEAT_INTERVAL.

Referenced by TouchControls::step().

+ Here is the caller graph for this function:

◆ id_to_keycode()

static EKEY_CODE id_to_keycode ( touch_gui_button_id id)
static

References aux1_id, camera_id, chat_id, debug_id, drop_id, exit_id, fast_id, fly_id, g_settings, Settings::get(), inventory_id, jump_id, keyname_to_keycode(), minimap_id, noclip_id, range_id, sneak_id, toggle_chat_id, warningstream, and zoom_id.

Referenced by TouchControls::addButton(), TouchControls::applyJoystickStatus(), and TouchControls::mayAddButton().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load_button_texture()

static void load_button_texture ( IGUIImage * gui_button,
const std::string & path,
const recti & button_rect,
ISimpleTextureSource * tsrc,
video::IVideoDriver * driver )
static

References ISimpleTextureSource::getTexture(), and guiScalingImageButton().

Referenced by TouchControls::addButton(), button_info::emitAction(), and TouchControls::makeButtonDirect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ g_touchcontrols