oh-my-git/scenes/notification.gd
2023-09-06 16:04:23 +02:00

20 lines
454 B
GDScript

extends Node2D
var text : set = _set_text
var button_texts = ["Got it!", "Interesting!", "Very useful!", "Cool!", "Nice!", "Thanks!", "Whatever...", "Okay!", "Yay!", "Awesome!"]
func _ready():
button_texts.shuffle()
$Panel/CenterContainer/OK.text = button_texts[0]
#func _gui_input(event):
# if event is InputEventMouseButton:
# queue_free()
func _set_text(new_text):
text = new_text
$Panel/Label.text = new_text
func confirm():
queue_free()