summaryrefslogtreecommitdiffstats
path: root/editor/plugins/collision_shape_2d_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/collision_shape_2d_editor_plugin.cpp')
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 005de096cd..029e3a558d 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -414,7 +414,7 @@ void CollisionShape2DEditor::_get_current_shape_type() {
canvas_item_editor->get_viewport_control()->update();
}
-void CollisionShape2DEditor::forward_draw_over_canvas(Control *p_canvas) {
+void CollisionShape2DEditor::forward_draw_over_viewport(Control *p_overlay) {
if (!node) {
return;
@@ -448,8 +448,8 @@ void CollisionShape2DEditor::forward_draw_over_canvas(Control *p_canvas) {
handles[0] = Point2(radius, -height);
handles[1] = Point2(0, -(height + radius));
- p_canvas->draw_texture(h, gt.xform(handles[0]) - size);
- p_canvas->draw_texture(h, gt.xform(handles[1]) - size);
+ p_overlay->draw_texture(h, gt.xform(handles[0]) - size);
+ p_overlay->draw_texture(h, gt.xform(handles[1]) - size);
} break;
@@ -459,7 +459,7 @@ void CollisionShape2DEditor::forward_draw_over_canvas(Control *p_canvas) {
handles.resize(1);
handles[0] = Point2(shape->get_radius(), 0);
- p_canvas->draw_texture(h, gt.xform(handles[0]) - size);
+ p_overlay->draw_texture(h, gt.xform(handles[0]) - size);
} break;
@@ -478,8 +478,8 @@ void CollisionShape2DEditor::forward_draw_over_canvas(Control *p_canvas) {
handles[0] = shape->get_normal() * shape->get_d();
handles[1] = shape->get_normal() * (shape->get_d() + 30.0);
- p_canvas->draw_texture(h, gt.xform(handles[0]) - size);
- p_canvas->draw_texture(h, gt.xform(handles[1]) - size);
+ p_overlay->draw_texture(h, gt.xform(handles[0]) - size);
+ p_overlay->draw_texture(h, gt.xform(handles[1]) - size);
} break;
@@ -489,7 +489,7 @@ void CollisionShape2DEditor::forward_draw_over_canvas(Control *p_canvas) {
handles.resize(1);
handles[0] = Point2(0, shape->get_length());
- p_canvas->draw_texture(h, gt.xform(handles[0]) - size);
+ p_overlay->draw_texture(h, gt.xform(handles[0]) - size);
} break;
@@ -501,8 +501,8 @@ void CollisionShape2DEditor::forward_draw_over_canvas(Control *p_canvas) {
handles[0] = Point2(ext.x, 0);
handles[1] = Point2(0, -ext.y);
- p_canvas->draw_texture(h, gt.xform(handles[0]) - size);
- p_canvas->draw_texture(h, gt.xform(handles[1]) - size);
+ p_overlay->draw_texture(h, gt.xform(handles[0]) - size);
+ p_overlay->draw_texture(h, gt.xform(handles[1]) - size);
} break;
@@ -513,8 +513,8 @@ void CollisionShape2DEditor::forward_draw_over_canvas(Control *p_canvas) {
handles[0] = shape->get_a();
handles[1] = shape->get_b();
- p_canvas->draw_texture(h, gt.xform(handles[0]) - size);
- p_canvas->draw_texture(h, gt.xform(handles[1]) - size);
+ p_overlay->draw_texture(h, gt.xform(handles[0]) - size);
+ p_overlay->draw_texture(h, gt.xform(handles[1]) - size);
} break;
}