feat: basic settings menu
This commit is contained in:
parent
70785c3b35
commit
8e215a6962
38 changed files with 1308 additions and 51 deletions
30
src/UI/ui_manager.gd
Normal file
30
src/UI/ui_manager.gd
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
class_name UIManager extends HBoxContainer
|
||||
|
||||
@export var current_active_panel: MainPanel
|
||||
@export var panel_array: Array[MainPanel] = []
|
||||
@export var container_collection_box: ContainerBox
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
var text: String = "Container %d" % container_collection_box.container_id
|
||||
current_active_panel.container_name_label.text = text
|
||||
panel_array.append(current_active_panel)
|
||||
|
||||
SignalBus.on_panel_created.connect(_on_panel_created)
|
||||
SignalBus.on_panel_requested.connect(_on_panel_requested)
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_panel_created() -> void:
|
||||
var new_panel: MainPanel = MainPanel.new()
|
||||
panel_array.append(new_panel)
|
||||
|
||||
func _on_panel_requested(index: int) -> void:
|
||||
print("Panel: %d requested" % index)
|
||||
current_active_panel.hide()
|
||||
current_active_panel = panel_array[index]
|
||||
add_child(current_active_panel)
|
||||
Loading…
Add table
Add a link
Reference in a new issue