diff options
| author | Mateus Felipe C. C. Pinto <mateusfccp@gmail.com> | 2018-12-17 23:53:54 -0200 |
|---|---|---|
| committer | Mateus Felipe C. C. Pinto <mateusfccp@gmail.com> | 2018-12-18 12:48:36 -0200 |
| commit | ca1935d6f776a789dda9e046e5624ba0715e2671 (patch) | |
| tree | 4f8ac3e95c088f1ae8e30b11dbd8dddb1cdc0b78 /scene/animation/animation_player.cpp | |
| parent | 0cff752be1f6c6a61ad72bcdf340c06d08277081 (diff) | |
| download | redot-engine-ca1935d6f776a789dda9e046e5624ba0715e2671.tar.gz | |
Add settings for single-quotes on completion
Diffstat (limited to 'scene/animation/animation_player.cpp')
| -rw-r--r-- | scene/animation/animation_player.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index cfc3b2f4ce..e41fb46ec0 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -34,7 +34,10 @@ #include "core/message_queue.h" #include "scene/scene_string_names.h" #include "servers/audio/audio_stream.h" + #ifdef TOOLS_ENABLED +#include "editor/editor_settings.h" + void AnimatedValuesBackup::update_skeletons() { for (int i = 0; i < entries.size(); i++) { @@ -1507,13 +1510,19 @@ NodePath AnimationPlayer::get_root() const { void AnimationPlayer::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const { +#ifdef TOOLS_ENABLED + const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\""; +#else + const String quote_style = "\""; +#endif + String pf = p_function; if (p_function == "play" || p_function == "play_backwards" || 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()) + "\""); + r_options->push_back(quote_style + String(E->get()) + quote_style); } } Node::get_argument_options(p_function, p_idx, r_options); |
