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

@@ -34,6 +34,8 @@ public:
const uint16_t main_id = const_hash("main");
float width;
float height;
glm::vec2 gesture_p0;
glm::vec2 gesture_p1;
#ifdef __ANDROID__
float zoom = 3.0;
#else
@@ -52,6 +54,10 @@ public:
bool mouse_move(float x, float y);
bool mouse_up(int button, float x, float y);
bool mouse_scroll(float x, float y, float delta);
bool mouse_cancel(int button);
bool gesture_start(const glm::vec2& p0, const glm::vec2& p1);
bool gesture_move(const glm::vec2& p0, const glm::vec2& p1);
bool gesture_end();
bool key_down(kKey key);
bool key_up(kKey key);
bool key_char(char key);