extends Control 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(): 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()