1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

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

@@ -274,6 +274,13 @@ bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const Str
if (r_raw_strength != nullptr) {
*r_raw_strength = strength;
}
if (r_event_index) {
if (input_event_action->get_event_index() >= 0) {
*r_event_index = input_event_action->get_event_index();
} else {
*r_event_index = E->value.inputs.size();
}
}
return input_event_action->get_action() == p_action;
}