Improved menu system

This commit is contained in:
Sch1nken 2024-03-23 17:49:33 +01:00
parent da78e7f287
commit c95b8186ab
12 changed files with 181 additions and 111 deletions

View file

@ -3,8 +3,8 @@ extends Control
@onready var exit_button = $PanelContainer/MarginContainer/VBoxContainer/ExitButton
@onready var lan_button = $PanelContainer/MarginContainer/VBoxContainer/LANButton
@onready var rules = $Rules
@onready var settings = $Settings
const SETTINGS = preload("res://UI/Settings/Settings.tscn")
const RULES = preload("res://UI/Rules/Rules.tscn")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@ -35,6 +35,10 @@ func _on_exit_button_pressed():
func _on_rules_button_pressed():
var rules = RULES.instantiate()
get_tree().root.add_child(rules)
rules.show_panel()
@ -52,5 +56,8 @@ func _on_local_button_pressed():
func _on_settings_button_pressed():
var settings = SETTINGS.instantiate()
get_tree().root.add_child(settings)
settings.show_panel()
pass # Replace with function body.