diff options
author | est31 <MTest31@outlook.com> | 2016-05-27 08:35:07 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2016-06-03 19:42:57 +0200 |
commit | 2060fd9cbe587d7e8ffe0cecdd67925f13a56c05 (patch) | |
tree | f9f74c0a6609b0063fec6ed6f3d43fe42e43d5f1 /src/guiFormSpecMenu.h | |
parent | 1e86c89f3614cf298916149a8f13d44ea671da64 (diff) | |
download | minetest-2060fd9cbe587d7e8ffe0cecdd67925f13a56c05.tar.gz minetest-2060fd9cbe587d7e8ffe0cecdd67925f13a56c05.tar.bz2 minetest-2060fd9cbe587d7e8ffe0cecdd67925f13a56c05.zip |
Initial Gamepad support
Adds initial ingame gamepad support to minetest.
Full Formspec support is not implemented yet and
can be added by a later change.
Diffstat (limited to 'src/guiFormSpecMenu.h')
-rw-r--r-- | src/guiFormSpecMenu.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/guiFormSpecMenu.h b/src/guiFormSpecMenu.h index 4122b1f56..2fb55070d 100644 --- a/src/guiFormSpecMenu.h +++ b/src/guiFormSpecMenu.h @@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "modalMenu.h" #include "guiTable.h" #include "network/networkprotocol.h" +#include "client/joystick_controller.h" #include "util/string.h" #include "util/enriched_string.h" @@ -278,6 +279,7 @@ class GUIFormSpecMenu : public GUIModalMenu public: GUIFormSpecMenu(irr::IrrlichtDevice* dev, + JoystickController *joystick, gui::IGUIElement* parent, s32 id, IMenuManager *menumgr, InventoryManager *invmgr, @@ -433,10 +435,11 @@ protected: video::SColor m_default_tooltip_color; private: - IFormSource *m_form_src; - TextDest *m_text_dst; - unsigned int m_formspec_version; - std::string m_focused_element; + IFormSource *m_form_src; + TextDest *m_text_dst; + unsigned int m_formspec_version; + std::string m_focused_element; + JoystickController *m_joystick; typedef struct { bool explicit_size; @@ -494,6 +497,8 @@ private: bool parseSizeDirect(parserData* data, std::string element); void parseScrollBar(parserData* data, std::string element); + void tryClose(); + /** * check if event is part of a double click * @param event event to evaluate |