From 2c90991482345401967fa438ec1ab45eca8b72d1 Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Sun, 18 Jul 2021 14:28:33 +0300 Subject: [PATCH] Closes #509 --- src/Tools/ShapeDrawer.gd | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Tools/ShapeDrawer.gd b/src/Tools/ShapeDrawer.gd index 356921e60..a50737c16 100644 --- a/src/Tools/ShapeDrawer.gd +++ b/src/Tools/ShapeDrawer.gd @@ -99,6 +99,7 @@ func draw_move(position : Vector2) -> void: _start += position - _offset _dest = position _offset = position + _set_cursor_text(_get_result_rect(_start, position)) func draw_end(position : Vector2) -> void: @@ -193,3 +194,10 @@ func _outline_point(p: Vector2, thickness: int = 1, include_p: bool = true) -> A array.append(p + Vector2(x,y)) return array + + +func _set_cursor_text(rect : Rect2) -> void: + cursor_text = "%s, %s" % [rect.position.x, rect.position.y] + cursor_text += " -> %s, %s" % [rect.end.x - 1, rect.end.y - 1] + cursor_text += " (%s, %s)" % [rect.size.x, rect.size.y] +