Added FLAGS to int hint to make an int a bitmask on the editor.

This commit is contained in:
Ovnuniarchos 2015-07-20 20:02:46 +02:00
parent f697ec2fe0
commit dd09ae50e1
1 changed files with 11 additions and 0 deletions

View File

@ -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;