1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-01 07:59:48 +00:00
Pixelorama/src/UI/Dialogs/PreviewDialog.gd

20 lines
401 B
GDScript3
Raw Normal View History

extends ConfirmationDialog
var path : String
var image : Image
func _on_PreviewDialog_about_to_show() -> void:
var img_texture := ImageTexture.new()
img_texture.create_from_image(image)
get_node("CenterContainer/TextureRect").texture = img_texture
func _on_PreviewDialog_popup_hide() -> void:
queue_free()
func _on_PreviewDialog_confirmed() -> void:
OpenSave.open_image_file(path, image)