mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
only redraw TimelineSeconds when needed
This commit is contained in:
parent
f81ef37e92
commit
9c7b90bb96
|
@ -9,9 +9,6 @@ var minor_subdivision := 3
|
|||
var first : Vector2
|
||||
var last : Vector2
|
||||
|
||||
# warning-ignore:unused_argument
|
||||
func _process(delta : float) -> void:
|
||||
update()
|
||||
|
||||
#Code taken and modified from Godot's source code
|
||||
func _draw() -> void:
|
||||
|
@ -54,4 +51,4 @@ func _draw() -> void:
|
|||
if i % minor_subdivision == 0:
|
||||
draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.33), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), color)
|
||||
else:
|
||||
draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.66), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), color)
|
||||
draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.66), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), color)
|
||||
|
|
Loading…
Reference in a new issue