Improved menu system
This commit is contained in:
parent
da78e7f287
commit
c95b8186ab
12 changed files with 181 additions and 111 deletions
|
|
@ -1,8 +1,7 @@
|
|||
extends Control
|
||||
|
||||
@onready var rules = $"../Rules"
|
||||
|
||||
|
||||
const IN_GAME_MENU = preload("res://UI/InGameMenu/InGameMenu.tscn")
|
||||
const RULES = preload("res://UI/Rules/Rules.tscn")
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
|
@ -14,4 +13,15 @@ func _process(delta):
|
|||
|
||||
|
||||
func _on_rules_button_pressed():
|
||||
var rules = RULES.instantiate()
|
||||
|
||||
get_tree().root.add_child(rules)
|
||||
|
||||
rules.show_panel()
|
||||
|
||||
func _on_menu_button_pressed():
|
||||
var in_game_menu = IN_GAME_MENU.instantiate()
|
||||
|
||||
get_tree().root.add_child(in_game_menu)
|
||||
|
||||
in_game_menu.show_panel()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue