1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-20 12:33:14 +00:00

Change the selection rectangle when switching projects

This commit is contained in:
OverloadedOrama 2020-06-05 16:14:57 +03:00
parent 35969b2f67
commit fc03e83377

View file

@ -91,6 +91,17 @@ func change_project() -> void:
self.animation_tags = animation_tags
if selected_pixels.size() != 0:
Global.selection_rectangle.polygon[0] = Vector2(x_min, y_min)
Global.selection_rectangle.polygon[1] = Vector2(x_max, y_min)
Global.selection_rectangle.polygon[2] = Vector2(x_max, y_max)
Global.selection_rectangle.polygon[3] = Vector2(x_min, y_max)
else:
Global.selection_rectangle.polygon[0] = Vector2.ZERO
Global.selection_rectangle.polygon[1] = Vector2.ZERO
Global.selection_rectangle.polygon[2] = Vector2.ZERO
Global.selection_rectangle.polygon[3] = Vector2.ZERO
func frames_changed(value : Array) -> void:
frames = value