diff options
Diffstat (limited to 'scene/2d/line_2d.cpp')
-rw-r--r-- | scene/2d/line_2d.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp index c782968ea0..1a57d24342 100644 --- a/scene/2d/line_2d.cpp +++ b/scene/2d/line_2d.cpp @@ -99,7 +99,7 @@ Color Line2D::get_default_color() const { return _default_color; } -void Line2D::set_gradient(const Ref<ColorRamp> &gradient) { +void Line2D::set_gradient(const Ref<Gradient> &gradient) { // Cleanup previous connection if any if (_gradient.is_valid()) { @@ -116,7 +116,7 @@ void Line2D::set_gradient(const Ref<ColorRamp> &gradient) { update(); } -Ref<ColorRamp> Line2D::get_gradient() const { +Ref<Gradient> Line2D::get_gradient() const { return _gradient; } @@ -310,7 +310,7 @@ void Line2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "points"), "set_points", "get_points"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "width"), "set_width", "get_width"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "default_color"), "set_default_color", "get_default_color"); - ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "gradient", PROPERTY_HINT_RESOURCE_TYPE, "ColorRamp"), "set_gradient", "get_gradient"); + ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "gradient", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_gradient", "get_gradient"); ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture"); ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "texture_mode", PROPERTY_HINT_ENUM, "None,Tile"), "set_texture_mode", "get_texture_mode"); ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "joint_mode", PROPERTY_HINT_ENUM, "Sharp,Bevel,Round"), "set_joint_mode", "get_joint_mode"); |