diff options
Diffstat (limited to 'editor/plugins/curve_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/curve_editor_plugin.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index d2d2b8f130..33f685892c 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -715,7 +715,7 @@ void CurveEditor::_draw() { if (_hover_point != -1) { const Color hover_color = line_color; Vector2 pos = curve.get_point_position(_hover_point); - stroke_rect(Rect2(get_view_pos(pos), Vector2(1, 1)).grow(_hover_radius), hover_color); + draw_rect(Rect2(get_view_pos(pos), Vector2(1, 1)).grow(_hover_radius), hover_color, false, Math::round(EDSCALE)); } // Help text @@ -726,23 +726,6 @@ void CurveEditor::_draw() { } } -// TODO That should be part of the drawing API... -void CurveEditor::stroke_rect(Rect2 rect, Color color) { - - // a---b - // | | - // c---d - Vector2 a(rect.position); - Vector2 b(rect.position.x + rect.size.x, rect.position.y); - Vector2 c(rect.position.x, rect.position.y + rect.size.y); - Vector2 d(rect.position + rect.size); - - draw_line(a, b, color, Math::round(EDSCALE)); - draw_line(b, d, color, Math::round(EDSCALE)); - draw_line(d, c, color, Math::round(EDSCALE)); - draw_line(c, a, color, Math::round(EDSCALE)); -} - void CurveEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_gui_input"), &CurveEditor::on_gui_input); ClassDB::bind_method(D_METHOD("_on_preset_item_selected"), &CurveEditor::on_preset_item_selected); |