summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-12-12 17:10:43 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-12-12 17:10:43 -0300
commit6316f8941c5371ecb861041c23c2ae04abf236d5 (patch)
treee5a7f879d81946aab1aaf9f9d6cd7c4547eed40b
parent101049518a71eeece66bc94688ae69d9018cdeb0 (diff)
variant parser was not parsing rect2 properly, fixes #2948
-rw-r--r--core/variant_parser.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index fed8c28740..9232245051 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -460,6 +460,19 @@ Error VariantParser::parse_value(Token& token,Variant &value,Stream *p_stream,in
value=Vector2(args[0],args[1]);
return OK;
+ } else if (id=="Rect2"){
+
+ Vector<float> args;
+ Error err = _parse_construct<float>(p_stream,args,line,r_err_str);
+ if (err)
+ return err;
+
+ if (args.size()!=4) {
+ r_err_str="Expected 2 arguments for constructor";
+ }
+
+ value=Rect2(args[0],args[1],args[2],args[3]);
+ return OK;
} else if (id=="Vector3"){
Vector<float> args;