diff options
| author | Fabio Alessandrelli | 2016-10-03 02:40:53 +0200 |
|---|---|---|
| committer | Fabio Alessandrelli | 2016-10-03 02:40:53 +0200 |
| commit | 941f46038415bfdc52f61b68511c83fed59fc2fe (patch) | |
| tree | 3914f7781afab8ca42116010c5f82c03d518bc18 /core/variant_parser.cpp | |
| parent | 3ecd8560fd90a615d80a447b04e713bb2c600fe4 (diff) | |
| download | godot-941f46038415bfdc52f61b68511c83fed59fc2fe.tar.gz godot-941f46038415bfdc52f61b68511c83fed59fc2fe.tar.zst godot-941f46038415bfdc52f61b68511c83fed59fc2fe.zip | |
Diffstat (limited to 'core/variant_parser.cpp')
| -rw-r--r-- | core/variant_parser.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp index 023605a95..6b3828a57 100644 --- a/core/variant_parser.cpp +++ b/core/variant_parser.cpp @@ -986,7 +986,18 @@ Error VariantParser::parse_value(Token& token,Variant &value,Stream *p_stream,in InputEvent ie; - if (id=="KEY") { + if (id=="NONE") { + + ie.type=InputEvent::NONE; + + get_token(p_stream,token,line,r_err_str); + + if (token.type!=TK_PARENTHESIS_CLOSE) { + r_err_str="Expected ')'"; + return ERR_PARSE_ERROR; + } + + } else if (id=="KEY") { get_token(p_stream,token,line,r_err_str); if (token.type!=TK_COMMA) { @@ -2093,6 +2104,9 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str case InputEvent::JOYSTICK_MOTION: { str+="JAXIS,"+itos(ev.joy_motion.axis)+","+itos(ev.joy_motion.axis_value); } break; + case InputEvent::NONE: { + str+="NONE"; + } break; default: {} } |
