feat: Introduce a settings manager and UI for configuring video, audio, and control keybinds.
This commit is contained in:
@@ -223,3 +223,11 @@ func get_control_text(action_name: String) -> String:
|
||||
var code = get_control_keycode(action_name)
|
||||
if code == -1: return "Unbound"
|
||||
return OS.get_keycode_string(code)
|
||||
|
||||
func is_key_used(keycode: int) -> String:
|
||||
"""Check if a keycode is already assigned to any action."""
|
||||
for action in settings.controls.keys():
|
||||
if action == "use_controller": continue
|
||||
if settings.controls[action] == keycode:
|
||||
return action
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user