diff options
author | tpart <tpart120@proton.me> | 2024-09-17 15:55:43 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-09-17 15:56:20 +0200 |
commit | c953a601500eead8161baf012e338e3ea496ceaf (patch) | |
tree | 59867880437e86d4e1b74720210c70770b50852f /client/menu/settings/input/input_value_node.gd | |
parent | ea5e8bad363a6e490c787b0e5f13bb6defd4c450 (diff) | |
download | hurrycurry-c953a601500eead8161baf012e338e3ea496ceaf.tar hurrycurry-c953a601500eead8161baf012e338e3ea496ceaf.tar.bz2 hurrycurry-c953a601500eead8161baf012e338e3ea496ceaf.tar.zst |
Refactor hints system to use new input manager; Add input manager helper function; Fix lots of bugs; Update translations
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) |