diff options
Diffstat (limited to 'client/menu/settings/input/input_value_node.gd')
-rw-r--r-- | client/menu/settings/input/input_value_node.gd | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/client/menu/settings/input/input_value_node.gd b/client/menu/settings/input/input_value_node.gd index 9f89416b..ef00c09b 100644 --- a/client/menu/settings/input/input_value_node.gd +++ b/client/menu/settings/input/input_value_node.gd @@ -34,20 +34,9 @@ func update(fix_focus: bool = false): c.queue_free() for e: InputEvent in value: - var description: String - - if e is InputEventKey: - description = tr("%s (Keyboard)") % OS.get_keycode_string(e.physical_keycode) - elif e is InputEventMouseButton: - description = tr("Mouse button %s") % e.button_index - elif e is InputEventJoypadButton: - description = tr("%s (Joypad)") % e.button_index - elif e is InputEventJoypadMotion: - description = tr("Joypad axis %s") % [e.axis] - else: - description = tr("Other event") - + var description: String = InputManager.display_input_event(e) var button := Button.new() + button.text = description button.pressed.connect(erase_event.bind(e)) actions_container.add_child(button) |