Add event_index to InputEventAction

This commit is contained in:
kobewi
2023-12-10 19:23:29 +01:00
parent 60844997bb
commit 17d3f26e5d
5 changed files with 27 additions and 1 deletions

View File

@@ -453,6 +453,7 @@ class InputEventAction : public InputEvent {
StringName action;
float strength = 1.0f;
int event_index = -1;
protected:
static void _bind_methods();
@@ -466,6 +467,9 @@ public:
void set_strength(float p_strength);
float get_strength() const;
void set_event_index(int p_index);
int get_event_index() const;
virtual bool is_action(const StringName &p_action) const;
virtual bool action_match(const Ref<InputEvent> &p_event, bool p_exact_match, float p_deadzone, bool *r_pressed, float *r_strength, float *r_raw_strength) const override;