From b6cc1c3b95de7a9afc2d1a1132e87a0b72c19645 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 4 Feb 2024 15:32:20 +0100 Subject: b --- editor/tests/path-test.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/editor/tests/path-test.cpp b/editor/tests/path-test.cpp index 672c7aa3..7fb2a65c 100644 --- a/editor/tests/path-test.cpp +++ b/editor/tests/path-test.cpp @@ -123,6 +123,25 @@ void path_test::draw_overlay(app& a) draw.AddCircleFilled({pos.x(), pos.y()}, dot_radius, dot_color); last = pos; } + + if (!result.found && !result.path.empty()) + { + auto pos = a.point_screen_pos(result.path.back()); + constexpr float spacing = 12, size1 = 7, size2 = 3, spacing2 = spacing + size2; + + draw.AddLine({pos.x() - spacing2, pos.y() - spacing2}, + {pos.x() + spacing2, pos.y() + spacing2}, + line_color, size1); + draw.AddLine({pos.x() + spacing2, pos.y() - spacing2}, + {pos.x() - spacing2, pos.y() + spacing2}, + line_color, size1); + draw.AddLine({pos.x() + spacing, pos.y() - spacing}, + {pos.x() - spacing, pos.y() + spacing}, + dot_color, size2); + draw.AddLine({pos.x() - spacing, pos.y() - spacing}, + {pos.x() + spacing, pos.y() + spacing}, + dot_color, size2); + } } void path_test::update_pre(app& a) -- cgit v1.2.3