Files
lime/project/include/ui/GamepadEvent.h
2018-06-09 08:25:16 -07:00

58 lines
693 B
C++

#ifndef LIME_UI_GAMEPAD_EVENT_H
#define LIME_UI_GAMEPAD_EVENT_H
#include <hl.h>
#include <hx/CFFI.h>
namespace lime {
enum GamepadEventType {
GAMEPAD_AXIS_MOVE,
GAMEPAD_BUTTON_DOWN,
GAMEPAD_BUTTON_UP,
GAMEPAD_CONNECT,
GAMEPAD_DISCONNECT
};
struct HL_GamepadEvent {
hl_type* t;
int axis;
int button;
int id;
GamepadEventType type;
double value;
};
class GamepadEvent {
public:
static AutoGCRoot* callback;
static AutoGCRoot* eventObject;
GamepadEvent ();
static void Dispatch (GamepadEvent* event);
int axis;
double axisValue;
int button;
int id;
GamepadEventType type;
};
}
#endif