diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-09-14 18:06:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-14 18:06:11 +0200 |
commit | c9df3fbfdb03d9d9fd6ba4740dcbd800e39a3e04 (patch) | |
tree | 574ca52551caa8a453c3cf74fd36b8e68c568187 /core/input_map.cpp | |
parent | e099fea259d85a44f533821c5337cdb0f91c00cc (diff) | |
parent | bf16f89a302239ea1abc4dd767eda01f61cb9feb (diff) |
Merge pull request #21954 from isaacremnant/fix_inputs
Fix is_action_pressed for InputEventActions
Diffstat (limited to 'core/input_map.cpp')
-rw-r--r-- | core/input_map.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/input_map.cpp b/core/input_map.cpp index 51e3f311a9..b88d99470a 100644 --- a/core/input_map.cpp +++ b/core/input_map.cpp @@ -199,6 +199,10 @@ bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const Str Ref<InputEventAction> input_event_action = p_event; if (input_event_action.is_valid()) { + if (p_pressed != NULL) + *p_pressed = input_event_action->is_pressed(); + if (p_strength != NULL) + *p_strength = (*p_pressed) ? 1.0f : 0.0f; return input_event_action->get_action() == p_action; } |