aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/abstract_polygon_2d_editor.cpp
diff options
context:
space:
mode:
authorBernhard Liebl2017-11-12 09:46:37 +0100
committerBernhard Liebl2017-11-13 18:49:06 +0100
commit89f7032c2e944255955b5eabf0b2df4c2190748d (patch)
tree48932c6e0667015d393b52cae34dd080ee903810 /editor/plugins/abstract_polygon_2d_editor.cpp
parentb3c08a83266b591cc8442946e94d71eab992ec49 (diff)
downloadgodot-89f7032c2e944255955b5eabf0b2df4c2190748d.tar.gz
godot-89f7032c2e944255955b5eabf0b2df4c2190748d.tar.zst
godot-89f7032c2e944255955b5eabf0b2df4c2190748d.zip
Diffstat (limited to 'editor/plugins/abstract_polygon_2d_editor.cpp')
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index f2f913d2b..736e176ab 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -563,6 +563,14 @@ void AbstractPolygon2DEditor::forward_draw_over_canvas(Control *p_canvas) {
const Vector2 next_point = xform.xform(p2);
vpc->draw_line(point, next_point, col, 2);
}
+ }
+
+ for (int i = 0; i < n_points; i++) {
+
+ const Vertex vertex(j, i);
+
+ const Vector2 p = (vertex == edited_point) ? edited_point.pos : (points[i] + offset);
+ const Vector2 point = xform.xform(p);
Ref<Texture> handle = vertex == active_point ? selected_handle : default_handle;
vpc->draw_texture(handle, point - handle->get_size() * 0.5);