You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks a lot for the great efforts that have gone into this addon <3.
I tried to use it to map an input event in my controls menu to remap primary and secondary input bindings. Before I simply had
current_binding_button.text = event.as_text()
which doesn't look as nice as those shiny icons.
So I tried
func update_binding(event: InputEvent) -> void:if event is InputEventKey or event is InputEventJoypadButton and event.pressed:
InputMap.action_erase_event(current_action_to_bind, current_event_to_unbind)
InputMap.action_add_event(current_action_to_bind, event)
ControllerIcons.refresh()
var controller_icon = ControllerIconTexture.new()
controller_icon.path = current_action_to_bind
if event is InputEventJoypadButton:
controller_icon.force_type = ControllerIconTexture.ForceType.CONTROLLER
elif event is InputEventKey:
controller_icon.force_type = ControllerIconTexture.ForceType.KEYBOARD_MOUSE
current_binding_button.icon = controller_icon
current_binding_button.text =""
and found out that the addon currently don't support multiple events for one action for the same event type.
Should I use specific paths for the time being? How would I go about the mapping from the InputEvent to the path for the icon? You ought to already have this functionality in your addon.
When an input action has multiple alternative keys/buttons, only the first mapping is shown:
![image](https://user-images.githubusercontent.com/6501975/212670118-91a543e7-635e-42f0-aedb-400e83f7f331.png)
There should be a way for developers to:
my_action{2}
to show the second mapping if it exists)The text was updated successfully, but these errors were encountered: