mirror of
https://github.com/Relintai/broken_seals.git
synced 2025-01-15 02:01:09 +01:00
Make sure that polygon's changed method is called even when the control points were only moved.
This commit is contained in:
parent
17d0dc99dd
commit
bb7fee062c
@ -24,6 +24,9 @@ func _register_methods(mm_graph_node) -> void:
|
||||
func get_property_value(uv : Vector2) -> float:
|
||||
return SDF2D.sdPolygon(uv, points)
|
||||
|
||||
func polygon_changed() -> void:
|
||||
_polygon_changed()
|
||||
|
||||
func _polygon_changed() -> void:
|
||||
emit_changed()
|
||||
output.emit_changed()
|
||||
|
@ -19,13 +19,14 @@ func _on_CurveDialog_popup_hide():
|
||||
|
||||
func _on_OK_pressed():
|
||||
emit_signal("polygon_changed", polygon)
|
||||
polygon.polygon_changed()
|
||||
|
||||
queue_free()
|
||||
|
||||
func _on_Cancel_pressed():
|
||||
polygon.set_points(previous_points)
|
||||
emit_signal("polygon_changed", polygon)
|
||||
|
||||
|
||||
queue_free()
|
||||
|
||||
func edit_polygon(poly):
|
||||
|
@ -32,6 +32,7 @@ func update_controls() -> void:
|
||||
func _on_ControlPoint_moved(index):
|
||||
var control_point = get_child(index)
|
||||
polygon.points[index] = reverse_transform_point(control_point.rect_position+control_point.OFFSET)
|
||||
|
||||
update()
|
||||
|
||||
emit_signal("value_changed", polygon)
|
||||
|
Loading…
Reference in New Issue
Block a user