From c953a601500eead8161baf012e338e3ea496ceaf Mon Sep 17 00:00:00 2001 From: tpart Date: Tue, 17 Sep 2024 15:55:43 +0200 Subject: Refactor hints system to use new input manager; Add input manager helper function; Fix lots of bugs; Update translations --- client/menu/settings/input/input_value_node.gd | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'client/menu/settings/input/input_value_node.gd') 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) -- cgit v1.2.3-70-g09d2