summaryrefslogtreecommitdiff
path: root/core/input/input.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-10-01 17:06:48 +0200
committerRémi Verschelde <rverschelde@gmail.com>2021-10-04 16:16:05 +0200
commitb85dfd990e26ffb22643d78e5f00ba135d1f97e7 (patch)
tree49a5a867b3f89af045b565c832716821b6f91a98 /core/input/input.cpp
parent865b62b1cddbb7989bc520eed2d8428c6923fee9 (diff)
GDScript completion: Handle quote style ad-hoc to remove editor dependency
`core` and `scene` shouldn't depend on `editor`, so they can't query this style setting in `get_argument_options`. But we can handle it after the fact in GDScript's completion code. Also cleans up a couple extra unused invalid includes in `core`.
Diffstat (limited to 'core/input/input.cpp')
-rw-r--r--core/input/input.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp
index 05b02408a1..f9a361c761 100644
--- a/core/input/input.cpp
+++ b/core/input/input.cpp
@@ -35,10 +35,6 @@
#include "core/input/input_map.h"
#include "core/os/os.h"
-#ifdef TOOLS_ENABLED
-#include "editor/editor_settings.h"
-#endif
-
static const char *_joy_buttons[JOY_BUTTON_SDL_MAX] = {
"a",
"b",
@@ -162,9 +158,6 @@ void Input::_bind_methods() {
}
void Input::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
-#ifdef TOOLS_ENABLED
- const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
-
String pf = p_function;
if (p_idx == 0 && (pf == "is_action_pressed" || pf == "action_press" || pf == "action_release" ||
pf == "is_action_just_pressed" || pf == "is_action_just_released" ||
@@ -179,10 +172,9 @@ void Input::get_argument_options(const StringName &p_function, int p_idx, List<S
}
String name = pi.name.substr(pi.name.find("/") + 1, pi.name.length());
- r_options->push_back(name.quote(quote_style));
+ r_options->push_back(name.quote());
}
}
-#endif
}
void Input::SpeedTrack::update(const Vector2 &p_delta_p) {