diff options
author | Franklin Sobrinho <franklin_gs@hotmail.com> | 2015-11-26 09:40:13 -0300 |
---|---|---|
committer | Franklin Sobrinho <franklin_gs@hotmail.com> | 2015-11-26 09:40:13 -0300 |
commit | 69a6524adf47d4669a726f85cf3b2624ac4c3c3e (patch) | |
tree | b1ef0eddcfb45d200bcaff95dd13989cffb60f96 | |
parent | 2ea992b7881a350ebae7df45c8069830e2ef6cc2 (diff) |
Add script auto-completion for function parameters
-rw-r--r-- | modules/gdscript/gd_editor.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index 0d986e92a2..381edcba50 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -1291,6 +1291,15 @@ static void _find_identifiers(GDCompletionContext& context,int p_line,bool p_onl const GDParser::BlockNode *block=context.block; + if (context.function) { + + const GDParser::FunctionNode* f = context.function; + + for (int i=0;i<f->arguments.size();i++) { + result.insert(f->arguments[i].operator String()); + } + } + while(block) { GDCompletionContext c = context; |