ajout de panneaux de contrôles, de paramètres et refactorisation de la gestion de l'audio

This commit is contained in:
2025-11-22 15:10:41 +01:00
parent dbe8f03531
commit 435415363c
171 changed files with 2165 additions and 922 deletions

View File

@@ -0,0 +1,33 @@
@tool
extends Control
const INPUT_GROUP_SCENE = preload("res://gui/menu/controls/input_group.tscn")
@export_tool_button("Update", "Callable") var update_action = create_input_list
func _ready():
create_input_list()
if not Engine.is_editor_hint():
%ControlsWindow.close_window()
show()
func open_controls():
%ControlsWindow.open_window()
func close_controls():
%ControlsWindow.close_window()
func create_input_list():
InputMap.load_from_project_settings()
for child in %ControlsContainer.get_children():
child.queue_free()
for action in InputMap.get_actions():
if action.substr(0, 3) != "ui_":
var input_group = instantiate_input_group()
input_group.action_name = action
%ControlsContainer.add_child(input_group)
func instantiate_input_group() -> InputGroup:
return INPUT_GROUP_SCENE.instantiate() as InputGroup