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:
parent
a5a8bf1fe5
commit
740d7e237d
BIN
assets/graphics/dotted_line.png
Normal file
BIN
assets/graphics/dotted_line.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 84 B |
34
assets/graphics/dotted_line.png.import
Normal file
34
assets/graphics/dotted_line.png.import
Normal 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
|
|
@ -1,10 +1,18 @@
|
||||||
class_name SymmetryGuide extends Guide
|
class_name SymmetryGuide extends Guide
|
||||||
|
|
||||||
|
|
||||||
|
var _texture = preload("res://assets/graphics/dotted_line.png")
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
._ready()
|
._ready()
|
||||||
has_focus = false
|
has_focus = false
|
||||||
visible = 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:
|
func _input(_event : InputEvent) -> void:
|
||||||
|
@ -14,6 +22,9 @@ func _input(_event : InputEvent) -> void:
|
||||||
elif type == Types.VERTICAL:
|
elif type == Types.VERTICAL:
|
||||||
project.x_symmetry_point = points[0].x * 2 - 1
|
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:
|
func outside_canvas() -> bool:
|
||||||
if type == Types.HORIZONTAL:
|
if type == Types.HORIZONTAL:
|
||||||
|
|
Loading…
Reference in a new issue