#include <touchscreenlayout.h>
Public Member Functions | |
core::recti | getRect (touch_gui_button_id btn, v2u32 screensize, s32 button_size, ISimpleTextureSource *tsrc) |
std::vector< touch_gui_button_id > | getMissingButtons () |
void | serializeJson (std::ostream &os) const |
void | deserializeJson (std::istream &is) |
Static Public Member Functions | |
static bool | isButtonAllowed (touch_gui_button_id id) |
static bool | isButtonRequired (touch_gui_button_id id) |
static s32 | getButtonSize (v2u32 screensize) |
static ButtonLayout | loadFromSettings () |
static video::ITexture * | getTexture (touch_gui_button_id btn, ISimpleTextureSource *tsrc) |
static void | clearTextureCache () |
Public Attributes | |
std::unordered_map< touch_gui_button_id, ButtonMeta > | layout |
Static Public Attributes | |
static const ButtonLayout | predefined |
Static Private Attributes | |
static std::unordered_map< touch_gui_button_id, irr_ptr< video::ITexture > > | texture_cache |
|
static |
References texture_cache.
Referenced by GUITouchscreenLayout::~GUITouchscreenLayout().
void ButtonLayout::deserializeJson | ( | std::istream & | is | ) |
References button_name_to_id(), isButtonAllowed(), layout, ButtonMeta::offset, and ButtonMeta::position.
|
static |
References g_settings, RenderingEngine::getDisplayDensity(), and Settings::getFloat().
Referenced by TouchControls::TouchControls(), layout_button_grid(), GUITouchscreenLayout::regenerateGui(), and TouchControls::step().
std::vector< touch_gui_button_id > ButtonLayout::getMissingButtons | ( | ) |
References isButtonAllowed(), layout, and touch_gui_button_id_END.
Referenced by TouchControls::applyLayout(), GUITouchscreenLayout::regenerateGUIImagesAddMode(), and GUITouchscreenLayout::regenerateMenu().
core::recti ButtonLayout::getRect | ( | touch_gui_button_id | btn, |
v2u32 | screensize, | ||
s32 | button_size, | ||
ISimpleTextureSource * | tsrc ) |
References ButtonMeta::getPos(), getTexture(), and layout.
Referenced by TouchControls::applyLayout(), GUITouchscreenLayout::regenerateGUIImagesRegular(), and GUITouchscreenLayout::updateDragState().
|
static |
References button_image_names, ISimpleTextureSource::getTexture(), porting::path_share, and texture_cache.
Referenced by getRect(), layout_button_grid(), GUITouchscreenLayout::regenerateGUIImagesAddMode(), and GUITouchscreenLayout::regenerateGUIImagesRegular().
|
static |
References joystick_bg_id, joystick_center_id, joystick_off_id, and touch_gui_button_id_END.
Referenced by deserializeJson(), getMissingButtons(), and TouchControls::mayAddButton().
|
static |
References overflow_id.
Referenced by GUITouchscreenLayout::regenerateMenu().
|
static |
References g_settings, Settings::get(), layout, predefined, and warningstream.
Referenced by GUITouchscreenLayout::GUITouchscreenLayout(), and TouchControls::TouchControls().
void ButtonLayout::serializeJson | ( | std::ostream & | os | ) | const |
References button_names, fastWriteJson(), and layout.
Referenced by GUITouchscreenLayout::OnEvent().
std::unordered_map<touch_gui_button_id, ButtonMeta> ButtonLayout::layout |
Referenced by TouchControls::applyLayout(), GUITouchscreenLayout::clearGUIImages(), deserializeJson(), getMissingButtons(), getRect(), loadFromSettings(), GUITouchscreenLayout::OnEvent(), GUITouchscreenLayout::regenerateGui(), GUITouchscreenLayout::regenerateGUIImagesAddMode(), GUITouchscreenLayout::regenerateGUIImagesRegular(), serializeJson(), and GUITouchscreenLayout::updateDragState().
|
static |
Referenced by loadFromSettings(), and GUITouchscreenLayout::OnEvent().
|
staticprivate |
Referenced by clearTextureCache(), and getTexture().