1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

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.
This commit is contained in:
est31 2016-05-27 08:35:07 +02:00
parent 1e86c89f36
commit 2060fd9cbe
17 changed files with 577 additions and 80 deletions

View file

@ -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