diff options
Diffstat (limited to 'scene/2d/line_2d.cpp')
-rw-r--r-- | scene/2d/line_2d.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp index 837f3061f1..6a72280f3d 100644 --- a/scene/2d/line_2d.cpp +++ b/scene/2d/line_2d.cpp @@ -76,7 +76,7 @@ bool Line2D::_edit_is_selected_on_click(const Point2 &p_point, double p_toleranc void Line2D::set_points(const Vector<Vector2> &p_points) { _points = p_points; - update(); + queue_redraw(); } void Line2D::set_width(float p_width) { @@ -84,7 +84,7 @@ void Line2D::set_width(float p_width) { p_width = 0.0; } _width = p_width; - update(); + queue_redraw(); } float Line2D::get_width() const { @@ -104,7 +104,7 @@ void Line2D::set_curve(const Ref<Curve> &p_curve) { _curve->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Line2D::_curve_changed)); } - update(); + queue_redraw(); } Ref<Curve> Line2D::get_curve() const { @@ -118,7 +118,7 @@ Vector<Vector2> Line2D::get_points() const { void Line2D::set_point_position(int i, Vector2 p_pos) { ERR_FAIL_INDEX(i, _points.size()); _points.set(i, p_pos); - update(); + queue_redraw(); } Vector2 Line2D::get_point_position(int i) const { @@ -134,7 +134,7 @@ void Line2D::clear_points() { int count = _points.size(); if (count > 0) { _points.clear(); - update(); + queue_redraw(); } } @@ -144,17 +144,17 @@ void Line2D::add_point(Vector2 p_pos, int p_atpos) { } else { _points.insert(p_atpos, p_pos); } - update(); + queue_redraw(); } void Line2D::remove_point(int i) { _points.remove_at(i); - update(); + queue_redraw(); } void Line2D::set_default_color(Color p_color) { _default_color = p_color; - update(); + queue_redraw(); } Color Line2D::get_default_color() const { @@ -174,7 +174,7 @@ void Line2D::set_gradient(const Ref<Gradient> &p_gradient) { _gradient->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Line2D::_gradient_changed)); } - update(); + queue_redraw(); } Ref<Gradient> Line2D::get_gradient() const { @@ -183,7 +183,7 @@ Ref<Gradient> Line2D::get_gradient() const { void Line2D::set_texture(const Ref<Texture2D> &p_texture) { _texture = p_texture; - update(); + queue_redraw(); } Ref<Texture2D> Line2D::get_texture() const { @@ -192,7 +192,7 @@ Ref<Texture2D> Line2D::get_texture() const { void Line2D::set_texture_mode(const LineTextureMode p_mode) { _texture_mode = p_mode; - update(); + queue_redraw(); } Line2D::LineTextureMode Line2D::get_texture_mode() const { @@ -201,7 +201,7 @@ Line2D::LineTextureMode Line2D::get_texture_mode() const { void Line2D::set_joint_mode(LineJointMode p_mode) { _joint_mode = p_mode; - update(); + queue_redraw(); } Line2D::LineJointMode Line2D::get_joint_mode() const { @@ -210,7 +210,7 @@ Line2D::LineJointMode Line2D::get_joint_mode() const { void Line2D::set_begin_cap_mode(LineCapMode p_mode) { _begin_cap_mode = p_mode; - update(); + queue_redraw(); } Line2D::LineCapMode Line2D::get_begin_cap_mode() const { @@ -219,7 +219,7 @@ Line2D::LineCapMode Line2D::get_begin_cap_mode() const { void Line2D::set_end_cap_mode(LineCapMode p_mode) { _end_cap_mode = p_mode; - update(); + queue_redraw(); } Line2D::LineCapMode Line2D::get_end_cap_mode() const { @@ -239,7 +239,7 @@ void Line2D::set_sharp_limit(float p_limit) { p_limit = 0.f; } _sharp_limit = p_limit; - update(); + queue_redraw(); } float Line2D::get_sharp_limit() const { @@ -248,7 +248,7 @@ float Line2D::get_sharp_limit() const { void Line2D::set_round_precision(int p_precision) { _round_precision = MAX(1, p_precision); - update(); + queue_redraw(); } int Line2D::get_round_precision() const { @@ -257,7 +257,7 @@ int Line2D::get_round_precision() const { void Line2D::set_antialiased(bool p_antialiased) { _antialiased = p_antialiased; - update(); + queue_redraw(); } bool Line2D::get_antialiased() const { @@ -334,11 +334,11 @@ void Line2D::_draw() { } void Line2D::_gradient_changed() { - update(); + queue_redraw(); } void Line2D::_curve_changed() { - update(); + queue_redraw(); } // static |