diff options
author | Ovnuniarchos <pujalte.jorge@gmail.com> | 2015-07-20 20:02:46 +0200 |
---|---|---|
committer | Ovnuniarchos <pujalte.jorge@gmail.com> | 2015-07-20 20:02:46 +0200 |
commit | dd09ae50e117f618381480d4f1281536b557ae0b (patch) | |
tree | 04c6cf4807fd76aedb444a4bd12fc87ce8fb4c63 /modules/gdscript/gd_parser.cpp | |
parent | f697ec2fe022583dde5f3ae650f49cfd7f237c33 (diff) | |
download | redot-engine-dd09ae50e117f618381480d4f1281536b557ae0b.tar.gz |
Added FLAGS to int hint to make an int a bitmask on the editor.
Diffstat (limited to 'modules/gdscript/gd_parser.cpp')
-rw-r--r-- | modules/gdscript/gd_parser.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index afe8c9aa71..50036e7b83 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -2315,6 +2315,17 @@ void GDParser::_parse_class(ClassNode *p_class) { case Variant::INT: { + if (tokenizer->get_token()==GDTokenizer::TK_IDENTIFIER && tokenizer->get_token_identifier()=="FLAGS") { + + current_export.hint=PROPERTY_HINT_ALL_FLAGS; + tokenizer->advance(); + if (tokenizer->get_token()!=GDTokenizer::TK_PARENTHESIS_CLOSE) { + _set_error("Expected ')' in hint."); + return; + } + break; + } + if (tokenizer->get_token()==GDTokenizer::TK_CONSTANT && tokenizer->get_token_constant().get_type()==Variant::STRING) { //enumeration current_export.hint=PROPERTY_HINT_ENUM; |