mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 07:14:42 -04:00
Made Symmetry Guides have dotted lines
Just to make them different from regular Guides
This commit is contained in:
parent
a5a8bf1fe5
commit
740d7e237d
3 changed files with 45 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue