mirror of
https://github.com/Relintai/GraphicsEditor.git
synced 2024-11-12 08:15:17 +01:00
20 lines
571 B
GDScript3
20 lines
571 B
GDScript3
|
extends ConfirmationDialog
|
||
|
tool
|
||
|
|
||
|
func _ready():
|
||
|
find_node("Width").value = owner.paint_canvas.canvas_width
|
||
|
find_node("Height").value = owner.paint_canvas.canvas_height
|
||
|
|
||
|
|
||
|
func _on_ConfirmationDialog_confirmed():
|
||
|
var width = find_node("Width").value
|
||
|
var height = find_node("Height").value
|
||
|
print("change canvas size: ", width, " ", height)
|
||
|
owner.paint_canvas.resize(width, height)
|
||
|
|
||
|
|
||
|
func _on_ChangeCanvasSize_visibility_changed():
|
||
|
if visible:
|
||
|
find_node("Width").value = owner.paint_canvas.canvas_width
|
||
|
find_node("Height").value = owner.paint_canvas.canvas_height
|