mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-05-06 03:24:50 -04:00
only redraw TimelineSeconds when needed
This commit is contained in:
parent
f81ef37e92
commit
9c7b90bb96
1 changed files with 1 additions and 4 deletions
|
@ -9,9 +9,6 @@ var minor_subdivision := 3
|
||||||
var first : Vector2
|
var first : Vector2
|
||||||
var last : Vector2
|
var last : Vector2
|
||||||
|
|
||||||
# warning-ignore:unused_argument
|
|
||||||
func _process(delta : float) -> void:
|
|
||||||
update()
|
|
||||||
|
|
||||||
#Code taken and modified from Godot's source code
|
#Code taken and modified from Godot's source code
|
||||||
func _draw() -> void:
|
func _draw() -> void:
|
||||||
|
@ -54,4 +51,4 @@ func _draw() -> void:
|
||||||
if i % minor_subdivision == 0:
|
if i % minor_subdivision == 0:
|
||||||
draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.33), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), color)
|
draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.33), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), color)
|
||||||
else:
|
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…
Add table
Reference in a new issue