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

- Correcly display Vector2Array default arguments in the documentation

(cherry picked from commit 2060e6616c)
This commit is contained in:
Ignacio Etcheverry 2016-05-04 15:04:12 +02:00 committed by Rémi Verschelde
parent 913818a246
commit 975b4d2927
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

@ -283,6 +283,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+")";