From 7157df772cca0b88f23b7d38829d3f87631eecc0 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 8 Mar 2022 12:20:49 +0100 Subject: [PATCH] Also fixed the gradient editor popup thing. --- .../mat_maker_gd/widgets/gradient_editor/gradient_editor.gd | 2 +- .../mat_maker_gd/widgets/gradient_editor/gradient_popup.gd | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_editor.gd b/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_editor.gd index 180a2cd1..f100e3d1 100644 --- a/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_editor.gd +++ b/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_editor.gd @@ -199,7 +199,7 @@ func _gui_input(ev) -> void: var popup_size = popup.rect_size popup.popup(Rect2(ev.global_position, Vector2(0, 0))) popup.set_global_position(ev.global_position-Vector2(popup_size.x / 2, popup_size.y)) - popup.init(value) + popup.init(value, graph_node, _undo_redo) popup.connect("updated", self, "set_value") popup.connect("popup_hide", popup, "queue_free") diff --git a/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_popup.gd b/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_popup.gd index d45a20c0..466c12cc 100644 --- a/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_popup.gd +++ b/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_popup.gd @@ -3,7 +3,9 @@ extends Popup signal updated(value) -func init(value) -> void: +func init(value, graph_node, undo_redo) -> void: + $Panel/Control.set_undo_redo(undo_redo) + $Panel/Control.graph_node = graph_node $Panel/Control.set_value(value) func _on_Control_updated(value) -> void: