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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/dotted_line.png-9a94e4e6ebf9c11e53076f53e529d37a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/dotted_line.png"
dest_files=[ "res://.import/dotted_line.png-9a94e4e6ebf9c11e53076f53e529d37a.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=1
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

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: