mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:24:44 -04:00
Added guides
- Added horizontal & vertical guides which can be dragged from their respective rulers - Fixed bug when opening and importing files
This commit is contained in:
parent
8b5ee21d01
commit
224316256c
10 changed files with 186 additions and 98 deletions
|
@ -46,7 +46,7 @@ func _draw() -> void:
|
|||
draw_line(Vector2(position.x + RULER_WIDTH, 0), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), Color.white)
|
||||
var val = (ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(i, 0)).x / 100
|
||||
val = stepify(val, 0.01)
|
||||
draw_string(font, Vector2(position.x + RULER_WIDTH + 2, font.get_height() - 6), str(val))
|
||||
draw_string(font, Vector2(position.x + RULER_WIDTH + 2, font.get_height() - 6), "%ss" % str(val))
|
||||
else:
|
||||
if i % minor_subdivision == 0:
|
||||
draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.33), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), Color.white)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue