education-apps/digibord_tools/godot/main_buttons.gd

27 lines
607 B
GDScript

extends Button
@onready var start_screen = get_node("../..")
@onready var calculator_screen = get_node("../../CalculatorScreen")
@onready var dice_screen = get_node("../../DiceScreen")
# 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_ButtonCalculator_pressed():
start_screen.visible = false
calculator_screen.visible = true
func _on_ButtonDice_pressed():
start_screen.visible = false
dice_screen.visible = true