Implement HTML5 touch events

(cherry picked from commit 86f5ac3d74)
This commit is contained in:
Leon Krause 2017-04-24 21:41:39 +02:00
parent 9b07e32656
commit b717d1dc4c
2 changed files with 103 additions and 210 deletions

View file

@ -48,15 +48,7 @@ typedef void (*GFXInitFunc)(void *ud, bool gl2, int w, int h, bool fs);
typedef String (*GetDataDirFunc)();
class OS_JavaScript : public OS_Unix {
public:
struct TouchPos {
int id;
Point2 pos;
};
private:
Vector<TouchPos> touch;
Point2 last_mouse;
unsigned int last_id;
GFXInitFunc gfx_init_func;
void *gfx_init_ud;
@ -166,7 +158,6 @@ public:
virtual String get_resource_dir() const;
void process_accelerometer(const Vector3 &p_accelerometer);
void process_touch(int p_what, int p_pointer, const Vector<TouchPos> &p_points);
void push_input(const InputEvent &p_ev);
virtual bool is_joy_known(int p_device);