diff options
| author | Felix Yang | 2018-03-30 16:20:24 +0200 |
|---|---|---|
| committer | Felix Yang | 2018-04-03 21:56:54 +0200 |
| commit | 7d5a40c3e6fbd90f02ae677fc20300c3f38772df (patch) | |
| tree | c2d7244e9c93602e5f90852a8049342871c61da8 /editor/plugins/script_text_editor.cpp | |
| parent | b61021d34fd453799e278eaeee8346d0587516ac (diff) | |
| download | godot-7d5a40c3e6fbd90f02ae677fc20300c3f38772df.tar.gz godot-7d5a40c3e6fbd90f02ae677fc20300c3f38772df.tar.zst godot-7d5a40c3e6fbd90f02ae677fc20300c3f38772df.zip | |
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
| -rw-r--r-- | editor/plugins/script_text_editor.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index c8ea2f79f..6c488fce5 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -789,6 +789,26 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c emit_signal("go_to_help", "class_method:" + result.class_name + ":" + result.class_member); } break; + case ScriptLanguage::LookupResult::RESULT_CLASS_ENUM: { + + StringName cname = result.class_name; + StringName success; + while (true) { + success = ClassDB::get_integer_constant_enum(cname, result.class_member, true); + if (success != StringName()) { + result.class_name = cname; + cname = ClassDB::get_parent_class(cname); + } else { + break; + } + } + + emit_signal("go_to_help", "class_enum:" + result.class_name + ":" + result.class_member); + + } break; + case ScriptLanguage::LookupResult::RESULT_CLASS_TBD_GLOBALSCOPE: { + emit_signal("go_to_help", "class_global:" + result.class_name + ":" + result.class_member); + } break; } } } |
