[iOS] Add Apple Pencil pressure and tilt support.

This commit is contained in:
bruvzg
2022-12-23 17:37:45 +02:00
parent 5784bf1be0
commit 223a612c0c
7 changed files with 75 additions and 5 deletions

View File

@@ -384,6 +384,9 @@ class InputEventScreenDrag : public InputEventFromWindow {
Vector2 pos;
Vector2 relative;
Vector2 velocity;
Vector2 tilt;
float pressure = 0;
bool pen_inverted = false;
protected:
static void _bind_methods();
@@ -392,6 +395,15 @@ public:
void set_index(int p_index);
int get_index() const;
void set_tilt(const Vector2 &p_tilt);
Vector2 get_tilt() const;
void set_pressure(float p_pressure);
float get_pressure() const;
void set_pen_inverted(bool p_inverted);
bool get_pen_inverted() const;
void set_position(const Vector2 &p_pos);
Vector2 get_position() const;