feat: implement settings menu with video, audio, and input remapping support
This commit is contained in:
@@ -23,6 +23,9 @@ extends CanvasLayer
|
||||
@onready var SettingsManager = get_node_or_null("/root/SettingsManager")
|
||||
var listening_action: String = "" # Set when waiting for a keypress
|
||||
|
||||
# Keys removed from the game - skip them even if stale user config has them
|
||||
const DEPRECATED_ACTIONS: Array = ["put", "put_alt"]
|
||||
|
||||
func _ready():
|
||||
# Theme inheritance is broken by CanvasLayer root, no need for theme = null
|
||||
_load_ui_values()
|
||||
@@ -107,7 +110,7 @@ func _connect_signals():
|
||||
|
||||
# Connect remapping buttons
|
||||
for action_name in SettingsManager.settings.controls.keys():
|
||||
if action_name == "use_controller":
|
||||
if action_name == "use_controller" or action_name in DEPRECATED_ACTIONS:
|
||||
continue
|
||||
|
||||
# Check Primary Button
|
||||
@@ -197,6 +200,8 @@ func _input(event):
|
||||
|
||||
func _update_all_key_labels():
|
||||
for action_name in SettingsManager.settings.controls.keys():
|
||||
if action_name in DEPRECATED_ACTIONS:
|
||||
continue
|
||||
_update_key_label(action_name)
|
||||
|
||||
func _update_key_label(action_name: String):
|
||||
|
||||
Reference in New Issue
Block a user