Made Symmetry Guides have dotted lines

Just to make them different from regular Guides
This commit is contained in:
OverloadedOrama 2020-07-16 05:35:31 +03:00
parent a5a8bf1fe5
commit 740d7e237d
3 changed files with 45 additions and 0 deletions

View file

@ -1,10 +1,18 @@
class_name SymmetryGuide extends Guide
var _texture = preload("res://assets/graphics/dotted_line.png")
func _ready() -> void:
._ready()
has_focus = false
visible = false
texture = _texture
texture_mode = Line2D.LINE_TEXTURE_TILE
width = Global.camera.zoom.x * 4
yield(get_tree().create_timer(0.01), "timeout")
modulate = Global.guide_color
func _input(_event : InputEvent) -> void:
@ -14,6 +22,9 @@ func _input(_event : InputEvent) -> void:
elif type == Types.VERTICAL:
project.x_symmetry_point = points[0].x * 2 - 1
yield(get_tree().create_timer(0.01), "timeout")
width = Global.camera.zoom.x * 4
func outside_canvas() -> bool:
if type == Types.HORIZONTAL: