Add configurable strength value to InputEventAction

This commit is contained in:
Gilles Roudiere
2019-06-01 15:31:47 +02:00
parent 449395716f
commit f247832832
4 changed files with 21 additions and 1 deletions

View File

@ -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;