diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-04 15:32:20 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-04 15:32:20 +0100 |
commit | b6cc1c3b95de7a9afc2d1a1132e87a0b72c19645 (patch) | |
tree | 920328d074e7e887ed60bc43b13caef1c9b6000c /editor/tests | |
parent | a65aaeb43df61a9127aed0c4eb8dd4cb0b3b0bd6 (diff) |
b
Diffstat (limited to 'editor/tests')
-rw-r--r-- | editor/tests/path-test.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
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) |