extends HBoxContainer

@onready var _error_label := $ErrorLabel

var _text : String

func _process(delta):
	_process_error_label_font_size()

func _process_error_label_font_size():
	var new_font_size = get_viewport_rect().size.y*(8.0/475.0) + 250.0/19.0
	_error_label.add_theme_font_size_override("font_size", new_font_size)

func _ready():
	set_message(String())

func get_message() -> String:
	return _text

func set_message(value : String):
	_error_label.text = _text
	_error_label.text = value if value == "" else "❗ " + value
