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/gui | |
| parent | 0cff752be1f6c6a61ad72bcdf340c06d08277081 (diff) | |
Add settings for single-quotes on completion
Diffstat (limited to 'scene/gui')
| -rw-r--r-- | scene/gui/control.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index a580d89439..03a7de7056 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2645,6 +2645,12 @@ bool Control::is_visibility_clip_disabled() const { void Control::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 + Node::get_argument_options(p_function, p_idx, r_options); if (p_idx == 0) { @@ -2662,7 +2668,7 @@ void Control::get_argument_options(const StringName &p_function, int p_idx, List sn.sort_custom<StringName::AlphCompare>(); for (List<StringName>::Element *E = sn.front(); E; E = E->next()) { - r_options->push_back("\"" + E->get() + "\""); + r_options->push_back(quote_style + E->get() + quote_style); } } } |