oh-my-git/scenes/notification.gd

31 lines
494 B
GDScript3
Raw Normal View History

extends Node2D
2020-12-22 15:38:43 +01:00
var text setget _set_text
var button_texts = [
tr("GOT_IT"),
tr("INTERESTING"),
tr("VERY_USEFULL"),
tr("COOL"),
tr("NICE"),
tr("THANKS"),
tr("WHATEVER"),
tr("OKAY"),
tr("YAY"),
tr("AWESOME") ]
2020-12-22 15:38:43 +01:00
func _ready():
button_texts.shuffle()
$Panel/CenterContainer/OK.text = button_texts[0]
2020-12-22 15:38:43 +01:00
#func _gui_input(event):
# if event is InputEventMouseButton:
# queue_free()
2020-12-22 15:38:43 +01:00
func _set_text(new_text):
text = new_text
$Panel/Label.text = new_text
func confirm():
queue_free()