Merge pull request #21820 from capnm/fix-GradientTexture-width-property

Set the lower bound for the GradientTexture width property to 1
This commit is contained in:
Rémi Verschelde 2018-09-10 12:41:58 +02:00 committed by GitHub
commit fd74dd15ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1606,7 +1606,7 @@ void GradientTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update"), &GradientTexture::_update);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "gradient", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_gradient", "get_gradient");
ADD_PROPERTY(PropertyInfo(Variant::INT, "width"), "set_width", "get_width");
ADD_PROPERTY(PropertyInfo(Variant::INT, "width", PROPERTY_HINT_RANGE, "1,2048,1,or_greater"), "set_width", "get_width");
}
void GradientTexture::set_gradient(Ref<Gradient> p_gradient) {