add tap event on iOS

This commit is contained in:
2019-11-26 21:44:01 +01:00
parent 9eafcecde9
commit 64f6b90911
5 changed files with 80 additions and 3 deletions

View File

@@ -89,6 +89,7 @@ enum class kEventCategory : uint8_t
KeyEvent,
ButtonEvent,
GestureEvent,
TouchEvent,
};
enum class kEventType : uint8_t
@@ -107,6 +108,7 @@ enum class kEventType : uint8_t
GestureStart,
GestureMove,
GestureEnd,
TouchTap,
KeyDown,
KeyUp,
KeyChar,
@@ -158,3 +160,12 @@ public:
glm::vec2 m_pos;
glm::vec2 m_pos_delta;
};
class TouchEvent : public Event
{
public:
TouchEvent() { m_cat = kEventCategory::TouchEvent; }
glm::vec2 m_pos;
int m_finger_count;
int m_tap_count;
};