Improved menu system
This commit is contained in:
parent
da78e7f287
commit
c95b8186ab
12 changed files with 181 additions and 111 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue