From e44e4c1366d584daebb551686ae8c6c277690239 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 12 Feb 2022 22:22:40 +0100 Subject: [PATCH] Fixed godoxel's save file dialog. --- game/addons/Godoxel/SaveFileDialog.gd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/game/addons/Godoxel/SaveFileDialog.gd b/game/addons/Godoxel/SaveFileDialog.gd index a803a06e..7517f21f 100644 --- a/game/addons/Godoxel/SaveFileDialog.gd +++ b/game/addons/Godoxel/SaveFileDialog.gd @@ -1,13 +1,14 @@ tool extends FileDialog -var canvas +#var canvas var file_path = "" -func _enter_tree(): - canvas = get_parent().find_node("Canvas") +#func _enter_tree(): + #canvas = get_parent().find_node("Canvas") + #canvas = get_parent().paint_canvas func _ready(): @@ -37,6 +38,7 @@ func _on_SaveFileDialog_confirmed(): func save_file(): var image = Image.new() + var canvas = get_parent().paint_canvas image.create(canvas.canvas_width, canvas.canvas_height, true, Image.FORMAT_RGBA8) image.lock()