summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_editor.cpp
diff options
context:
space:
mode:
authorHolonProduction <holonproduction@gmail.com>2023-11-26 14:37:45 +0100
committerHolonProduction <holonproduction@gmail.com>2024-07-13 10:47:26 +0200
commit402bdfa3b78a9c97c0e05006e14f1fcfa6131f6e (patch)
tree80eadc98965b4c8844116e5e7e8913eda6062da8 /modules/gdscript/gdscript_editor.cpp
parent97b8ad1af0f2b4a216f6f1263bef4fbc69e56c7b (diff)
downloadredot-engine-402bdfa3b78a9c97c0e05006e14f1fcfa6131f6e.tar.gz
Generate `arghint` for script types
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-rw-r--r--modules/gdscript/gdscript_editor.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index b58b44973e..f942e91cf7 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -2768,6 +2768,20 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
base_type = base_type.class_type->base_type;
} break;
+ case GDScriptParser::DataType::SCRIPT: {
+ if (base_type.script_type->is_valid() && base_type.script_type->has_method(p_method)) {
+ r_arghint = _make_arguments_hint(base_type.script_type->get_method_info(p_method), p_argidx);
+ return;
+ }
+ Ref<Script> base_script = base_type.script_type->get_base_script();
+ if (base_script.is_valid()) {
+ base_type.script_type = base_script;
+ } else {
+ base_type.kind = GDScriptParser::DataType::NATIVE;
+ base_type.builtin_type = Variant::OBJECT;
+ base_type.native_type = base_type.script_type->get_instance_base_type();
+ }
+ } break;
case GDScriptParser::DataType::NATIVE: {
StringName class_name = base_type.native_type;
if (!ClassDB::class_exists(class_name)) {