diff options
author | Marcus Elg <marcusaccounts@yahoo.se> | 2020-05-09 14:24:46 +0200 |
---|---|---|
committer | Marcus Elg <marcusaccounts@yahoo.se> | 2020-05-09 15:10:00 +0200 |
commit | 9a7e515d50de44759521cda54b8d12f92775a92c (patch) | |
tree | b7c78968d74b37e811e51e3fd7ce5291e04cd269 /editor/plugins | |
parent | 46f1d4ff8e111b66c457ebcf27c72f84f96721d3 (diff) |
Rename Lineshapes d to distance
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/collision_shape_2d_editor_plugin.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp index 594dd0d0cb..8973dca963 100644 --- a/editor/plugins/collision_shape_2d_editor_plugin.cpp +++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp @@ -81,7 +81,7 @@ Variant CollisionShape2DEditor::get_handle_value(int idx) const { Ref<LineShape2D> line = node->get_shape(); if (idx == 0) { - return line->get_d(); + return line->get_distance(); } else { return line->get_normal(); } @@ -162,7 +162,7 @@ void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) { Ref<LineShape2D> line = node->get_shape(); if (idx == 0) { - line->set_d(p_point.length()); + line->set_distance(p_point.length()); } else { line->set_normal(p_point.normalized()); } @@ -260,9 +260,9 @@ void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) { Ref<LineShape2D> line = node->get_shape(); if (idx == 0) { - undo_redo->add_do_method(line.ptr(), "set_d", line->get_d()); + undo_redo->add_do_method(line.ptr(), "set_distance", line->get_distance()); undo_redo->add_do_method(canvas_item_editor, "update_viewport"); - undo_redo->add_undo_method(line.ptr(), "set_d", p_org); + undo_redo->add_undo_method(line.ptr(), "set_distance", p_org); undo_redo->add_undo_method(canvas_item_editor, "update_viewport"); } else { undo_redo->add_do_method(line.ptr(), "set_normal", line->get_normal()); @@ -485,8 +485,8 @@ void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overla Ref<LineShape2D> shape = node->get_shape(); handles.resize(2); - handles.write[0] = shape->get_normal() * shape->get_d(); - handles.write[1] = shape->get_normal() * (shape->get_d() + 30.0); + handles.write[0] = shape->get_normal() * shape->get_distance(); + handles.write[1] = shape->get_normal() * (shape->get_distance() + 30.0); p_overlay->draw_texture(h, gt.xform(handles[0]) - size); p_overlay->draw_texture(h, gt.xform(handles[1]) - size); |