3d-printing-simulator-textb.../Scenes/UI/ui_notification.gd
2026-06-30 11:03:20 +03:00

11 lines
423 B
GDScript

extends Control
@onready var message_label: RichTextLabel = $Base/Margin/Message
@onready var animation_player: AnimationPlayer = $AnimationPlayer
func _ready() -> void:
GameData.notification_requested.connect(_on_notification_requested)
func _on_notification_requested(message: String, color: String) -> void:
message_label.text = '[color=%s]%s[/color]' % [color, message]
animation_player.play("show_notification")