1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 01:29:49 +00:00

Fix symmetry points being wrong on project initialization

The symmetry points were wrong if the "Show Guides" option in the View menu is toggled off, and mirroring was enabled.
This commit is contained in:
Emmanouil Papadeas 2022-07-04 21:36:19 +03:00
parent 23f591a862
commit f432defd1f
2 changed files with 7 additions and 7 deletions

View file

@ -61,19 +61,19 @@ func _init(_frames := [], _name := tr("untitled"), _size := Vector2(64, 64)) ->
OpenSave.current_save_paths.append("") OpenSave.current_save_paths.append("")
OpenSave.backup_save_paths.append("") OpenSave.backup_save_paths.append("")
x_symmetry_point = size.x / 2 x_symmetry_point = size.x
y_symmetry_point = size.y / 2 y_symmetry_point = size.y
x_symmetry_axis.type = x_symmetry_axis.Types.HORIZONTAL x_symmetry_axis.type = x_symmetry_axis.Types.HORIZONTAL
x_symmetry_axis.project = self x_symmetry_axis.project = self
x_symmetry_axis.add_point(Vector2(-19999, y_symmetry_point)) x_symmetry_axis.add_point(Vector2(-19999, y_symmetry_point / 2 + 0.5))
x_symmetry_axis.add_point(Vector2(19999, y_symmetry_point)) x_symmetry_axis.add_point(Vector2(19999, y_symmetry_point / 2 + 0.5))
Global.canvas.add_child(x_symmetry_axis) Global.canvas.add_child(x_symmetry_axis)
y_symmetry_axis.type = y_symmetry_axis.Types.VERTICAL y_symmetry_axis.type = y_symmetry_axis.Types.VERTICAL
y_symmetry_axis.project = self y_symmetry_axis.project = self
y_symmetry_axis.add_point(Vector2(x_symmetry_point, -19999)) y_symmetry_axis.add_point(Vector2(x_symmetry_point / 2 + 0.5, -19999))
y_symmetry_axis.add_point(Vector2(x_symmetry_point, 19999)) y_symmetry_axis.add_point(Vector2(x_symmetry_point / 2 + 0.5, 19999))
Global.canvas.add_child(y_symmetry_axis) Global.canvas.add_child(y_symmetry_axis)
if OS.get_name() == "HTML5": if OS.get_name() == "HTML5":

View file

@ -1,7 +1,7 @@
class_name SymmetryGuide class_name SymmetryGuide
extends Guide extends Guide
var _texture = preload("res://assets/graphics/dotted_line.png") var _texture: Texture = preload("res://assets/graphics/dotted_line.png")
func _ready() -> void: func _ready() -> void: