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
+8 -3
View File
@@ -44,8 +44,6 @@ var settings = {
# Actions
"grab": KEY_SPACE,
"grab_alt": KEY_J,
"put": KEY_R,
"put_alt": KEY_K,
"tekton_grab": KEY_G,
"tekton_grab_alt": KEY_L,
@@ -77,6 +75,14 @@ func load_settings():
print("[Settings] Loaded.")
else:
print("[Settings] Using defaults.")
# Remove deprecated keys that may persist in old saved configs
var deprecated_keys = ["put", "put_alt"]
for k in deprecated_keys:
if settings.controls.has(k):
settings.controls.erase(k)
print("[Settings] Removed deprecated control: ", k)
func save_settings():
var config = ConfigFile.new()
@@ -166,7 +172,6 @@ func apply_control_settings():
"move_left": "move_west",
"move_right": "move_east",
"grab": "action_grab",
"put": "action_put",
"use_powerup": "use_powerup",
"tekton_grab": "action_grab_tekton",
"attack_mode": "action_knock_tekton"