added basic gesture system on Android

This commit is contained in:
2017-04-18 01:10:06 +02:00
parent 45cf8c9168
commit ea1bff1f10
5 changed files with 141 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ enum class kEventCategory : uint8_t
MouseEvent,
KeyEvent,
ButtonEvent,
GestureEvent,
};
enum class kEventType : uint8_t
@@ -33,6 +34,10 @@ enum class kEventType : uint8_t
MouseEnter,
MouseLeave,
MouseScroll,
MouseCancel,
GestureStart,
GestureMove,
GestureEnd,
KeyDown,
KeyUp,
KeyChar,
@@ -62,3 +67,15 @@ public:
kKey m_key;
char m_char;
};
class GestureEvent : public Event
{
public:
GestureEvent() { m_cat = kEventCategory::GestureEvent; }
float m_distance;
float m_distance_delta;
float m_angle;
float m_angle_delta;
glm::vec2 m_pos;
glm::vec2 m_pos_delta;
};