add tap event on iOS
This commit is contained in:
11
src/event.h
11
src/event.h
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user