Minetest  5.4.0
AutoHideButtonBar Class Reference

#include <touchscreengui.h>

+ Collaboration diagram for AutoHideButtonBar:

Public Member Functions

 AutoHideButtonBar (IrrlichtDevice *device, IEventReceiver *receiver)
 
void init (ISimpleTextureSource *tsrc, const char *starter_img, int button_id, const v2s32 &UpperLeft, const v2s32 &LowerRight, autohide_button_bar_dir dir, float timeout)
 
 ~AutoHideButtonBar ()
 
void addButton (touch_gui_button_id id, const wchar_t *caption, const char *btn_image)
 
void addToggleButton (touch_gui_button_id id, const wchar_t *caption, const char *btn_image_1, const char *btn_image_2)
 
bool isButton (const SEvent &event)
 
void step (float dtime)
 
void deactivate ()
 
void hide ()
 
void show ()
 

Private Attributes

ISimpleTextureSourcem_texturesource = nullptr
 
irr::video::IVideoDriver * m_driver
 
IGUIEnvironment * m_guienv
 
IEventReceiver * m_receiver
 
button_info m_starter
 
std::vector< button_info * > m_buttons
 
v2s32 m_upper_left
 
v2s32 m_lower_right
 
bool m_active = false
 
bool m_visible = true
 
float m_timeout = 0.0f
 
float m_timeout_value = 3.0f
 
bool m_initialized = false
 
autohide_button_bar_dir m_dir = AHBB_Dir_Right_Left
 

Constructor & Destructor Documentation

◆ AutoHideButtonBar()

AutoHideButtonBar::AutoHideButtonBar ( IrrlichtDevice *  device,
IEventReceiver *  receiver 
)

◆ ~AutoHideButtonBar()

AutoHideButtonBar::~AutoHideButtonBar ( )

Member Function Documentation

◆ addButton()

void AutoHideButtonBar::addButton ( touch_gui_button_id  id,
const wchar_t *  caption,
const char *  btn_image 
)

References AHBB_Dir_Bottom_Top, AHBB_Dir_Left_Right, AHBB_Dir_Right_Left, AHBB_Dir_Top_Bottom, errorstream, id2keycode(), load_button_texture(), m_buttons, m_dir, m_driver, m_guienv, m_initialized, m_lower_right, m_texturesource, and m_upper_left.

Referenced by addToggleButton(), and TouchScreenGUI::init().

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

◆ addToggleButton()

void AutoHideButtonBar::addToggleButton ( touch_gui_button_id  id,
const wchar_t *  caption,
const char *  btn_image_1,
const char *  btn_image_2 
)

References addButton(), m_buttons, button_info::textures, and button_info::togglable.

Referenced by TouchScreenGUI::init().

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

◆ deactivate()

void AutoHideButtonBar::deactivate ( )

References button_info::guibutton, m_active, m_buttons, m_starter, and m_visible.

Referenced by step(), and TouchScreenGUI::translateEvent().

+ Here is the caller graph for this function:

◆ hide()

void AutoHideButtonBar::hide ( )

References button_info::guibutton, m_buttons, m_starter, and m_visible.

Referenced by TouchScreenGUI::Toggle().

+ Here is the caller graph for this function:

◆ init()

void AutoHideButtonBar::init ( ISimpleTextureSource tsrc,
const char *  starter_img,
int  button_id,
const v2s32 UpperLeft,
const v2s32 LowerRight,
autohide_button_bar_dir  dir,
float  timeout 
)

References dir(), button_info::guibutton, button_info::ids, button_info::immediate_release, button_info::keycode, load_button_texture(), m_dir, m_driver, m_guienv, m_initialized, m_lower_right, m_starter, m_texturesource, m_timeout_value, m_upper_left, and button_info::repeatcounter.

Referenced by TouchScreenGUI::init().

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

◆ isButton()

bool AutoHideButtonBar::isButton ( const SEvent &  event)

References button_info::guibutton, button_info::ids, load_button_texture(), m_active, m_buttons, m_driver, m_guienv, m_receiver, m_starter, m_texturesource, and m_timeout.

Referenced by TouchScreenGUI::translateEvent().

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

◆ show()

void AutoHideButtonBar::show ( )

References button_info::guibutton, m_active, m_buttons, m_starter, and m_visible.

Referenced by TouchScreenGUI::Toggle().

+ Here is the caller graph for this function:

◆ step()

void AutoHideButtonBar::step ( float  dtime)

References deactivate(), m_active, m_timeout, and m_timeout_value.

Referenced by TouchScreenGUI::step().

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

Member Data Documentation

◆ m_active

bool AutoHideButtonBar::m_active = false
private

Referenced by deactivate(), isButton(), show(), and step().

◆ m_buttons

std::vector<button_info *> AutoHideButtonBar::m_buttons
private

◆ m_dir

autohide_button_bar_dir AutoHideButtonBar::m_dir = AHBB_Dir_Right_Left
private

Referenced by addButton(), and init().

◆ m_driver

irr::video::IVideoDriver* AutoHideButtonBar::m_driver
private

Referenced by addButton(), init(), and isButton().

◆ m_guienv

IGUIEnvironment* AutoHideButtonBar::m_guienv
private

Referenced by addButton(), init(), and isButton().

◆ m_initialized

bool AutoHideButtonBar::m_initialized = false
private

Referenced by addButton(), and init().

◆ m_lower_right

v2s32 AutoHideButtonBar::m_lower_right
private

Referenced by addButton(), and init().

◆ m_receiver

IEventReceiver* AutoHideButtonBar::m_receiver
private

Referenced by isButton().

◆ m_starter

button_info AutoHideButtonBar::m_starter
private

◆ m_texturesource

ISimpleTextureSource* AutoHideButtonBar::m_texturesource = nullptr
private

Referenced by addButton(), init(), and isButton().

◆ m_timeout

float AutoHideButtonBar::m_timeout = 0.0f
private

Referenced by isButton(), and step().

◆ m_timeout_value

float AutoHideButtonBar::m_timeout_value = 3.0f
private

Referenced by init(), and step().

◆ m_upper_left

v2s32 AutoHideButtonBar::m_upper_left
private

Referenced by addButton(), and init().

◆ m_visible

bool AutoHideButtonBar::m_visible = true
private

Referenced by deactivate(), hide(), and show().


The documentation for this class was generated from the following files: