From eb9621624fbb508635d192f29089b043e8bee5d0 Mon Sep 17 00:00:00 2001 From: eska Date: Fri, 16 Oct 2015 20:37:13 +0200 Subject: [PATCH] Add GDScript export hint for real numbers with easing `export(float, EASE)` --- modules/gdscript/gd_parser.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index 47f39e9e819..313fb57d0e8 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) {