Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
touchscreenlayout.h File Reference
#include "irr_ptr.h"
#include "irrlichttypes_bloated.h"
#include "rect.h"
#include "util/enum_string.h"
#include <iostream>
#include <unordered_map>
+ Include dependency graph for touchscreenlayout.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ButtonMeta
 
struct  ButtonLayout
 

Namespaces

namespace  gui
 
namespace  video
 

Enumerations

enum  TouchInteractionStyle : u8 { TAP , TAP_CROSSHAIR , BUTTONS_CROSSHAIR }
 
enum  touch_gui_button_id : u8 {
  dig_id = 0 , place_id , jump_id , sneak_id ,
  zoom_id , aux1_id , overflow_id , chat_id ,
  inventory_id , drop_id , exit_id , fly_id ,
  fast_id , noclip_id , debug_id , camera_id ,
  range_id , minimap_id , toggle_chat_id , joystick_off_id ,
  joystick_bg_id , joystick_center_id , touch_gui_button_id_END
}
 

Functions

void layout_button_grid (v2u32 screensize, ISimpleTextureSource *tsrc, const std::vector< touch_gui_button_id > &buttons, const std::function< void(touch_gui_button_id btn, v2s32 pos, core::recti rect)> &callback)
 
void make_button_grid_title (gui::IGUIStaticText *text, touch_gui_button_id btn, v2s32 pos, core::recti rect)
 

Variables

const struct EnumString es_TouchInteractionStyle []
 
const char * button_names []
 
const char * button_titles []
 
const char * button_image_names []
 

Enumeration Type Documentation

◆ touch_gui_button_id

Enumerator
dig_id 
place_id 
jump_id 
sneak_id 
zoom_id 
aux1_id 
overflow_id 
chat_id 
inventory_id 
drop_id 
exit_id 
fly_id 
fast_id 
noclip_id 
debug_id 
camera_id 
range_id 
minimap_id 
toggle_chat_id 
joystick_off_id 
joystick_bg_id 
joystick_center_id 
touch_gui_button_id_END 

◆ TouchInteractionStyle

Enumerator
TAP 
TAP_CROSSHAIR 
BUTTONS_CROSSHAIR 

Function Documentation

◆ layout_button_grid()

void layout_button_grid ( v2u32 screensize,
ISimpleTextureSource * tsrc,
const std::vector< touch_gui_button_id > & buttons,
const std::function< void(touch_gui_button_id btn, v2s32 pos, core::recti rect)> & callback )

References ButtonLayout::getButtonSize(), and ButtonLayout::getTexture().

Referenced by TouchControls::applyLayout(), and GUITouchscreenLayout::regenerateGUIImagesAddMode().

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

◆ make_button_grid_title()

void make_button_grid_title ( gui::IGUIStaticText * text,
touch_gui_button_id btn,
v2s32 pos,
core::recti rect )

References button_titles, EnumString::str, and wstrgettext().

Referenced by TouchControls::applyLayout(), and GUITouchscreenLayout::regenerateGUIImagesAddMode().

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

Variable Documentation

◆ button_image_names

const char* button_image_names[]
extern

◆ button_names

const char* button_names[]
extern

◆ button_titles

const char* button_titles[]
extern

Referenced by make_button_grid_title().

◆ es_TouchInteractionStyle

const struct EnumString es_TouchInteractionStyle[]
extern