Change InputMap.action_get_events(action)
return value from Array to Dictionary
#9539
alvinseptiano
started this conversation in
Scripting
Replies: 2 comments 1 reply
-
This would make iterating over all the events not caring about what types they are much more inconvenient, but you can easily just iterate over it and pick what events you want, also this would break compatibility and hurt usefulness as they return a typed array making things easier and safer type wise |
Beta Was this translation helpful? Give feedback.
0 replies
-
Or maybe this can be done by separating |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Make it easier to extract value from
InputMap.action_get_events()
to determine whether InputEvent is a Joypad or Key.For example this is the current return value:
[InputEventKey: keycode=87 (W), mods=none, physical=true, pressed=false, echo=false, InputEventJoypadMotion: axis=1, axis_value=-1.00]
After:
{
InputEventKey: [keycode=87 (W), mods=none, physical=true, pressed=false, echo=false],
InputEventJoypadMotion: [axis=1, axis_value=-1.00]
InputEventJoypadButton: null
}
or any similar way so that everything is easier to get and more direct.
Beta Was this translation helpful? Give feedback.
All reactions