diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-08-10 12:57:20 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-10 12:57:20 -0300 |
commit | c76f444c4ec6971d5797568787b346ffde411c4a (patch) | |
tree | 125ee147aa053cc4299a92772a8a7a313fea8f5d /modules/gdscript/gdscript_editor.cpp | |
parent | b4006f68b35d4270a0f3555d9baa2d8622bfc1e5 (diff) | |
parent | ba974b8d1e245818d819791bd628e70ec3b92de3 (diff) |
Merge pull request #14704 from poke1024/colorconstants
Allow some non-integer built-in constants in gdscript
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 2a42524ba7..eadaf3feda 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -2442,7 +2442,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base } break; case GDScriptParser::COMPLETION_BUILT_IN_TYPE_CONSTANT: { List<StringName> constants; - Variant::get_numeric_constants_for_type(parser.get_completion_built_in_constant(), &constants); + Variant::get_constants_for_type(parser.get_completion_built_in_constant(), &constants); for (List<StringName>::Element *E = constants.front(); E; E = E->next()) { options.insert(E->get().operator String()); } @@ -3065,7 +3065,7 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co case GDScriptParser::DataType::BUILTIN: { base_type.has_type = false; - if (Variant::has_numeric_constant(base_type.builtin_type, p_symbol)) { + if (Variant::has_constant(base_type.builtin_type, p_symbol)) { r_result.type = ScriptLanguage::LookupResult::RESULT_CLASS_CONSTANT; r_result.class_name = Variant::get_type_name(base_type.builtin_type); r_result.class_member = p_symbol; |