Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
touchscreenlayout.cpp File Reference
#include "touchscreenlayout.h"
#include "client/renderingengine.h"
#include "client/texturesource.h"
#include "convert_json.h"
#include "gettext.h"
#include "settings.h"
#include <json/json.h>
#include "IGUIFont.h"
#include "IGUIStaticText.h"
+ Include dependency graph for touchscreenlayout.cpp:

Functions

static touch_gui_button_id button_name_to_id (const std::string &name)
 
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 char * button_names []
 
const char * button_titles []
 
const char * button_image_names []
 

Function Documentation

◆ button_name_to_id()

static touch_gui_button_id button_name_to_id ( const std::string & name)
static

References button_names, and touch_gui_button_id_END.

Referenced by ButtonLayout::deserializeJson().

+ Here is the caller graph for this function:

◆ 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, 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[]
Initial value:
= {
"jump_btn.png",
"down.png",
"zoom.png",
"aux1_btn.png",
"overflow_btn.png",
"chat_btn.png",
"inventory_btn.png",
"drop_btn.png",
"exit_btn.png",
"fly_btn.png",
"fast_btn.png",
"noclip_btn.png",
"debug_btn.png",
"camera_btn.png",
"rangeview_btn.png",
"minimap_btn.png",
"chat_hide_btn.png",
"joystick_off.png",
"joystick_bg.png",
"joystick_center.png",
}

Referenced by TouchControls::applyLayout(), ButtonLayout::getTexture(), and TouchControls::makeButtonDirect().

◆ button_names

const char* button_names[]
Initial value:
= {
"jump",
"sneak",
"zoom",
"aux1",
"overflow",
"chat",
"inventory",
"drop",
"exit",
"fly",
"fast",
"noclip",
"debug",
"camera",
"range",
"minimap",
"toggle_chat",
"joystick_off",
"joystick_bg",
"joystick_center",
}

Referenced by button_name_to_id(), and ButtonLayout::serializeJson().

◆ button_titles

const char* button_titles[]
Initial value:
= {
N_("Jump"),
N_("Sneak"),
N_("Zoom"),
N_("Aux1"),
N_("Overflow menu"),
N_("Chat"),
N_("Inventory"),
N_("Drop"),
N_("Exit"),
N_("Toggle fly"),
N_("Toggle fast"),
N_("Toggle noclip"),
N_("Toggle debug"),
N_("Change camera"),
N_("Range select"),
N_("Toggle minimap"),
N_("Toggle chat log"),
N_("Joystick"),
N_("Joystick"),
N_("Joystick"),
}
#define N_(text)
Definition keycode.cpp:31

Referenced by make_button_grid_title().