Swarm/MenuButtons.gd

28 lines
636 B
GDScript3
Raw Normal View History

extends Control
2024-03-23 17:49:33 +01:00
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.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_rules_button_pressed():
2024-03-23 17:49:33 +01:00
var rules = RULES.instantiate()
get_tree().root.add_child(rules)
rules.show_panel()
2024-03-23 17:49:33 +01:00
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()