Add missing Vector2Array case to Variant::operator String()

- Correcly display Vector2Array default arguments in the documentation
This commit is contained in:
Ignacio Etcheverry 2016-05-04 15:04:12 +02:00
parent 479cfb1d36
commit 2060e6616c
2 changed files with 13 additions and 0 deletions

View file

@ -1556,6 +1556,18 @@ Variant::operator String() const {
return str;
} break;
case VECTOR2_ARRAY: {
DVector<Vector2> vec = operator DVector<Vector2>();
String str;
for(int i=0;i<vec.size();i++) {
if (i>0)
str+=", ";
str=str+Variant( vec[i] );
}
return str;
} break;
case VECTOR3_ARRAY: {
DVector<Vector3> vec = operator DVector<Vector3>();

View file

@ -267,6 +267,7 @@ void DocData::generate(bool p_basic_types) {
case Variant::INT_ARRAY:
case Variant::REAL_ARRAY:
case Variant::STRING_ARRAY: //25
case Variant::VECTOR2_ARRAY:
case Variant::VECTOR3_ARRAY:
case Variant::COLOR_ARRAY:
default_arg_text=Variant::get_type_name(default_arg.get_type())+"("+default_arg_text+")";