diff options
| author | Juan Linietsky <reduzio@gmail.com> | 2014-12-16 22:31:57 -0300 |
|---|---|---|
| committer | Juan Linietsky <reduzio@gmail.com> | 2014-12-16 22:31:57 -0300 |
| commit | bcf27feb980aec593c7cb771984e46113cfad757 (patch) | |
| tree | dabc98af627732ccf5d1bbfa8aa58348030f6324 /scene/animation/animation_player.cpp | |
| parent | be4e40e90a5a322f6a7cec4893854ef5b15db600 (diff) | |
| download | redot-engine-bcf27feb980aec593c7cb771984e46113cfad757.tar.gz | |
New Code Completion
-=-=-=-=-=-=-=-=-=-
-Massive improvement to code completion
-Argument hinting for functions
If you manage to out-smart the code-completion in a situation where completion
should be possible to guess, let me know.
Please enter the commit message for your changes. Lines starting
Diffstat (limited to 'scene/animation/animation_player.cpp')
| -rw-r--r-- | scene/animation/animation_player.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 011850138b..f9d36138a2 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -1178,6 +1178,19 @@ NodePath AnimationPlayer::get_root() const { return root; } +void AnimationPlayer::get_argument_options(const StringName& p_function,int p_idx,List<String>*r_options) const { + + String pf = p_function; + if (p_function=="play" || p_function=="remove_animation" || p_function=="has_animation" || p_function=="queue") { + List<StringName> al; + get_animation_list(&al); + for (List<StringName>::Element *E=al.front();E;E=E->next()) { + + r_options->push_back("\""+String(E->get())+"\""); + } + } + Node::get_argument_options(p_function,p_idx,r_options); +} void AnimationPlayer::_bind_methods() { |
