aboutsummaryrefslogtreecommitdiff
path: root/client/menu/settings/input/input_manager.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/menu/settings/input/input_manager.gd')
-rw-r--r--client/menu/settings/input/input_manager.gd35
1 files changed, 5 insertions, 30 deletions
diff --git a/client/menu/settings/input/input_manager.gd b/client/menu/settings/input/input_manager.gd
index 96cdca09..784b4974 100644
--- a/client/menu/settings/input/input_manager.gd
+++ b/client/menu/settings/input/input_manager.gd
@@ -1,5 +1,6 @@
# Hurry Curry! - a game about cooking
# Copyright 2024 tpart
+# Copyright 2024 metamuffin
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -15,32 +16,6 @@
#
extends Node
-var action_descriptions = {
- "forwards": tr("Move forwards"),
- "backwards": tr("Move backwards"),
- "left": tr("Move left"),
- "right": tr("Move right"),
- "rotate_left": tr("Rotate camera to the left"),
- "rotate_right": tr("Rotate camera to the right"),
- "rotate_up": tr("Rotate camera upwards"),
- "rotate_down": tr("Rotate camera downwards"),
- "interact": tr("Interact", "Interacting with items, etc."),
- "boost": tr("Boost movement"),
- "zoom_in": tr("Zoom in"),
- "zoom_out": tr("Zoom out"),
- "chat": tr("Toggle chat", "Toggle chat on or off"),
- "reset": tr("Reset camera view"),
- "fullscreen": tr("Toggle fullscreen"),
- "previous": tr("Previous"),
- "next": tr("Next"),
- "start_game": tr("Start game"),
- "join_spectate": tr("Join / Spectate"),
- "zoom_in_discrete": tr("Zoom in (discrete)"),
- "zoom_out_discrete": tr("Zoom out (discrete)"),
- "scroll_down": tr("Scroll down"),
- "scroll_up": tr("Scroll up"),
-}
-
var default_input_map = {}
var input_map
@@ -56,12 +31,12 @@ func get_input_map() -> Dictionary:
kb[a] = input_events
return kb
-func input_map_to_settings_dictionary(map: Dictionary) -> Dictionary:
- var settings_dict := {}
+func input_map_to_settings(map: Dictionary) -> Array:
+ var entries := []
for k in map.keys():
var events = map[k]
- settings_dict[k] = InputSetting.new(action_descriptions[k] if action_descriptions.has(k) else k, events)
- return settings_dict
+ entries.append(InputSetting.new(k, events))
+ return entries
func settings_dictionary_to_input_map(settings: Dictionary) -> Dictionary:
var map := {}