diff options
author | Gilles Roudiere <gilles.roudiere@gmail.com> | 2019-06-01 15:31:47 +0200 |
---|---|---|
committer | Gilles Roudiere <gilles.roudiere@gmail.com> | 2019-06-02 14:31:34 +0200 |
commit | f24783283201a7508720c5bbc2548ef0563c8b99 (patch) | |
tree | 4c791d7c12ac8c29a7de3ed26ecba83c4b5768e9 /core/os/input_event.h | |
parent | 449395716f8bacafc667ce1cd5cd8e35572db0b2 (diff) |
Add configurable strength value to InputEventAction
Diffstat (limited to 'core/os/input_event.h')
-rw-r--r-- | core/os/input_event.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/os/input_event.h b/core/os/input_event.h index ba01516519..7a9a1f71c3 100644 --- a/core/os/input_event.h +++ b/core/os/input_event.h @@ -475,6 +475,7 @@ class InputEventAction : public InputEvent { StringName action; bool pressed; + float strength; protected: static void _bind_methods(); @@ -486,6 +487,9 @@ public: void set_pressed(bool p_pressed); virtual bool is_pressed() const; + void set_strength(float p_strength); + float get_strength() const; + virtual bool is_action(const StringName &p_action) const; virtual bool action_match(const Ref<InputEvent> &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const; |