starvingcats / GoDotFizzle

Share GoDot Project including assets
GNU General Public License v3.0
5 stars 1 forks source link

Use builtin datastructure for controls, to add icons for controller and keyboard buttons #41

Open gandie opened 4 years ago

gandie commented 4 years ago

Found: https://docs.godotengine.org/en/stable/classes/class_inputmap.html#class-inputmap-method-get-actions https://docs.godotengine.org/en/stable/classes/class_inputevent.html#class-inputevent-property-device

Usage Example:

    var action_events = InputMap.get_actions()
    for action in action_events:
        var input_events = InputMap.get_action_list(action)
        for event in input_events:
            print(event.as_text())

Map certain actions against icons in later iteration