From 2060e6616cb39362cddc3c57a94292896f9f4525 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Wed, 4 May 2016 15:04:12 +0200 Subject: [PATCH] Add missing Vector2Array case to Variant::operator String() - Correcly display Vector2Array default arguments in the documentation --- core/variant.cpp | 12 ++++++++++++ tools/doc/doc_data.cpp | 1 + 2 files changed, 13 insertions(+) diff --git a/core/variant.cpp b/core/variant.cpp index 527a0d238f4..ea5a378ad04 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -1556,6 +1556,18 @@ Variant::operator String() const { return str; } break; + case VECTOR2_ARRAY: { + + DVector vec = operator DVector(); + String str; + for(int i=0;i0) + str+=", "; + str=str+Variant( vec[i] ); + } + return str; + } break; case VECTOR3_ARRAY: { DVector vec = operator DVector(); diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp index 2d0d7617c2f..0bf69c1cdd3 100644 --- a/tools/doc/doc_data.cpp +++ b/tools/doc/doc_data.cpp @@ -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+")";