summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-08-07 19:22:33 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-08-07 19:22:33 -0300
commitb77200728e7f2b2dd446a9717c83a20c9aac0ce4 (patch)
treed5fd8da846cb1f86b68ecb6a1e0e4da5cae1a9dd /core/io
parent6671c6bdc78864bbe1d27c508ec9528f3b683ca2 (diff)
-Added yield nodes to visual script
-Added input selection nodes to visual script -Added script create icon for those who miss it, will only appear when it can be used.
Diffstat (limited to 'core/io')
-rw-r--r--core/io/resource_format_binary.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 343a54e0d7..a620dc0fef 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -447,13 +447,17 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant& r_v) {
} break;
case VARIANT_INPUT_EVENT: {
+ InputEvent ev;
+ ev.type=f->get_32(); //will only work for null though.
+ r_v=ev;
+
} break;
case VARIANT_DICTIONARY: {
- uint32_t len=f->get_32();
- Dictionary d(len&0x80000000); //last bit means shared
- len&=0x7FFFFFFF;
- for(uint32_t i=0;i<len;i++) {
+ uint32_t len=f->get_32();
+ Dictionary d(len&0x80000000); //last bit means shared
+ len&=0x7FFFFFFF;
+ for(uint32_t i=0;i<len;i++) {
Variant key;
Error err = parse_variant(key);
ERR_FAIL_COND_V(err,ERR_FILE_CORRUPT);
@@ -466,11 +470,11 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant& r_v) {
} break;
case VARIANT_ARRAY: {
- uint32_t len=f->get_32();
- Array a(len&0x80000000); //last bit means shared
- len&=0x7FFFFFFF;
+ uint32_t len=f->get_32();
+ Array a(len&0x80000000); //last bit means shared
+ len&=0x7FFFFFFF;
a.resize(len);
- for(uint32_t i=0;i<len;i++) {
+ for(uint32_t i=0;i<len;i++) {
Variant val;
Error err = parse_variant(val);
ERR_FAIL_COND_V(err,ERR_FILE_CORRUPT);
@@ -1725,7 +1729,9 @@ void ResourceFormatSaverBinaryInstance::write_variant(const Variant& p_property,
case Variant::INPUT_EVENT: {
f->store_32(VARIANT_INPUT_EVENT);
- WARN_PRINT("Can't save InputEvent (maybe it could..)");
+ InputEvent event=p_property;
+ f->store_32(0); //event type none, nothing else suported for now.
+
} break;
case Variant::DICTIONARY: {