extends Node

onready var content_label : Label = $"/root/Main/HUD/MessageDialog/ContentLabel"

onready var message_dlalog : PopupDialog = $"/root/Main/HUD/MessageDialog"

func _ready():
	message_dlalog.connect("gui_input",self,"on_message_dialog_input")
	pass

func showDialog(message:String) -> PopupDialog:
	content_label.text = message
	message_dlalog.popup()
	return message_dlalog

func on_message_dialog_input(event: InputEvent):
	if event is InputEventMouseButton and event.pressed:
		message_dlalog.visible = false
		message_dlalog.accept_event()
