summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreska <eska@eska.me>2015-10-16 20:37:13 +0200
committereska <eska@eska.me>2015-10-16 20:37:13 +0200
commiteb9621624fbb508635d192f29089b043e8bee5d0 (patch)
tree19f2859520219cebe35f92f24eea2d57a2988c93
parent57b2c4b0c6334b37d150a1945dfef45fb0783e94 (diff)
Add GDScript export hint for real numbers with easing `export(float, EASE)`
-rw-r--r--modules/gdscript/gd_parser.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index 47f39e9e81..313fb57d0e 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -2421,6 +2421,16 @@ void GDParser::_parse_class(ClassNode *p_class) {
}; //fallthrough to use the same
case Variant::REAL: {
+ if (tokenizer->get_token()==GDTokenizer::TK_IDENTIFIER && tokenizer->get_token_identifier()=="EASE") {
+ current_export.hint=PROPERTY_HINT_EXP_EASING;
+ tokenizer->advance();
+ if (tokenizer->get_token()!=GDTokenizer::TK_PARENTHESIS_CLOSE) {
+ _set_error("Expected ')' in hint.");
+ return;
+ }
+ break;
+ }
+
float sign=1.0;
if (tokenizer->get_token()==GDTokenizer::TK_OP_SUB) {