summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJairo Honorio <registrofx@gmail.com>2018-06-11 16:39:55 -0300
committerJairo Honorio <registrofx@gmail.com>2018-06-12 10:43:37 -0300
commitafcac41d313f64400b3ed8a19c64f7187d5b832f (patch)
tree1e8fb230e32b20e02fed3b7e36ff296125442f39 /modules
parentd5bb6faac77334154d2b16a3ff2d7ef6479b98be (diff)
Inner classes' functions now appear in the editor's functions panel
Fixes #19386
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/gdscript_editor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 4286412c14..0e4724fec2 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -118,6 +118,13 @@ bool GDScriptLanguage::validate(const String &p_script, int &r_line_error, int &
funcs[cl->static_functions[i]->line] = cl->static_functions[i]->name;
}
+ for (int i = 0; i < cl->subclasses.size(); i++) {
+ for (int j = 0; j < cl->subclasses[i]->functions.size(); j++) {
+
+ funcs[cl->subclasses[i]->functions[j]->line] = String(cl->subclasses[i]->name) + "." + String(cl->subclasses[i]->functions[j]->name);
+ }
+ }
+
for (Map<int, String>::Element *E = funcs.front(); E; E = E->next()) {
r_functions->push_back(E->get() + ":" + itos(E->key()));