mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
TouchControls: More methods instead of static functions (#15602)
This commit is contained in:
parent
f2b1cc3e61
commit
27c3aade5d
2 changed files with 57 additions and 66 deletions
|
@ -67,9 +67,6 @@ struct button_info
|
|||
SECOND_TEXTURE
|
||||
} toggleable = NOT_TOGGLEABLE;
|
||||
std::string toggle_textures[2];
|
||||
|
||||
void emitAction(bool action, video::IVideoDriver *driver,
|
||||
IEventReceiver *receiver, ISimpleTextureSource *tsrc);
|
||||
};
|
||||
|
||||
|
||||
|
@ -186,6 +183,19 @@ private:
|
|||
|
||||
std::shared_ptr<IGUIStaticText> m_status_text;
|
||||
|
||||
// Note: TouchControls intentionally uses IGUIImage instead of IGUIButton
|
||||
// for its buttons. We only want static image display, not interactivity,
|
||||
// from Irrlicht.
|
||||
|
||||
void emitKeyboardEvent(EKEY_CODE keycode, bool pressed);
|
||||
|
||||
void loadButtonTexture(IGUIImage *gui_button, const std::string &path);
|
||||
void buttonEmitAction(button_info &btn, bool action);
|
||||
|
||||
bool buttonsHandlePress(std::vector<button_info> &buttons, size_t pointer_id, IGUIElement *element);
|
||||
bool buttonsHandleRelease(std::vector<button_info> &buttons, size_t pointer_id);
|
||||
bool buttonsStep(std::vector<button_info> &buttons, float dtime);
|
||||
|
||||
void toggleOverflowMenu();
|
||||
void updateVisibility();
|
||||
void releaseAll();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue