You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
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`.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user