feat: implement settings menu with video, audio, and input remapping support

This commit is contained in:
Yogi Wiguna
2026-03-30 16:19:18 +08:00
parent c5da49d872
commit 91dc34a7be
8 changed files with 557 additions and 39 deletions
+6 -1
View File
@@ -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):