summaryrefslogtreecommitdiff
path: root/scene/animation
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-30 14:58:33 +0200
committerGitHub <noreply@github.com>2019-04-30 14:58:33 +0200
commit9dc9434b1bcde48259fa68066a7a3e2cff5d5eab (patch)
tree10e597c0df84b6eb358e56a408800440535b12ce /scene/animation
parentc991379b81e660e6c9d28620d61b87e9c0cb5233 (diff)
parentca1935d6f776a789dda9e046e5624ba0715e2671 (diff)
Merge pull request #24437 from mateusfccp/single_quotes_option
Add settings for single-quotes on completion
Diffstat (limited to 'scene/animation')
-rw-r--r--scene/animation/animation_player.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 016db15b73..ead3516116 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++) {
@@ -1510,13 +1513,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);