Does anyone have a good popup messagebox routine? Below is the one I used in 3.5 that doesn't work in 4.0.
func alert(text: String, title: String='Message') -> void:
# credit for original code to: https://gamedev.stackexchange.com/users/135571/hola
# https://gamedev.stackexchange.com/questions/177723/simple-message-box-in-gdscript-godot?newreg=265dab057bb6497a98f510e6efa3ae85
var dialog = AcceptDialog.new()
dialog.dialog_text = text
dialog.window_title = title
dialog.connect('modal_closed', Callable(dialog, 'queue_free'))
add_child(dialog)
dialog.popup_centered()