aboutsummaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_editor.cpp
diff options
context:
space:
mode:
authorPeter Folkins2018-04-26 13:16:00 -0500
committerHein-Pieter van Braam2018-05-13 22:04:37 +0200
commit31c4b743cbb84a90972135869011e4f687dba9fc (patch)
tree303dabb145ebf467d6e6ede335d0531ff473a2d5 /modules/gdscript/gdscript_editor.cpp
parent78e2e48d573b37a789776d8c613638c436d265e2 (diff)
downloadgodot-31c4b743cbb84a90972135869011e4f687dba9fc.tar.gz
godot-31c4b743cbb84a90972135869011e4f687dba9fc.tar.zst
godot-31c4b743cbb84a90972135869011e4f687dba9fc.zip
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-rw-r--r--modules/gdscript/gdscript_editor.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 08d9b6825..c675e611c 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -2641,6 +2641,18 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol
context.function = p.get_completion_function();
context.base = p_owner;
context.base_path = p_base_path;
+
+ if (context._class && context._class->extends_class.size() > 0) {
+ bool success = false;
+ ClassDB::get_integer_constant(context._class->extends_class[0], p_symbol, &success);
+ if (success) {
+ r_result.type = ScriptLanguage::LookupResult::RESULT_CLASS_CONSTANT;
+ r_result.class_name = context._class->extends_class[0];
+ r_result.class_member = p_symbol;
+ return OK;
+ }
+ }
+
bool isfunction = false;
switch (p.get_completion_type()) {