diff --git a/src/UI/Canvas/Rulers/HorizontalRuler.gd b/src/UI/Canvas/Rulers/HorizontalRuler.gd index 9f6480898..7c6e6297e 100644 --- a/src/UI/Canvas/Rulers/HorizontalRuler.gd +++ b/src/UI/Canvas/Rulers/HorizontalRuler.gd @@ -76,7 +76,9 @@ func _draw() -> void: ) var val = (ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(j, 0)).x draw_string( - font, Vector2(position.x + RULER_WIDTH + 2, font.get_height() - 4), str(int(val)) + font, + Vector2(position.x + RULER_WIDTH + 2, font.get_height() - 4), + str(stepify(val, 0.1)) ) else: if j % minor_subdivision == 0: diff --git a/src/UI/Canvas/Rulers/VerticalRuler.gd b/src/UI/Canvas/Rulers/VerticalRuler.gd index 9a1a57965..8cd12064c 100644 --- a/src/UI/Canvas/Rulers/VerticalRuler.gd +++ b/src/UI/Canvas/Rulers/VerticalRuler.gd @@ -73,7 +73,7 @@ func _draw() -> void: var text_xform = Transform2D(-PI / 2, Vector2(font.get_height() - 4, position.y - 2)) draw_set_transform_matrix(get_transform() * text_xform) var val = (ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(0, j)).y - draw_string(font, Vector2(), str(int(val))) + draw_string(font, Vector2(), str(stepify(val, 0.1))) draw_set_transform_matrix(get_transform()) else: if j % minor_subdivision == 0: