You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Merge pull request #86743 from Mickeon/autocompletion-optimise-object
Optimise comparisons for Object's `get_argument_options`
This commit is contained in:
@@ -205,13 +205,14 @@ void Control::set_root_layout_direction(int p_root_dir) {
|
||||
root_layout_direction = p_root_dir;
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
void Control::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
ERR_READ_THREAD_GUARD;
|
||||
CanvasItem::get_argument_options(p_function, p_idx, r_options);
|
||||
|
||||
if (p_idx == 0) {
|
||||
List<StringName> sn;
|
||||
String pf = p_function;
|
||||
const String pf = p_function;
|
||||
if (pf == "add_theme_color_override" || pf == "has_theme_color" || pf == "has_theme_color_override" || pf == "get_theme_color") {
|
||||
ThemeDB::get_singleton()->get_default_theme()->get_color_list(get_class(), &sn);
|
||||
} else if (pf == "add_theme_style_override" || pf == "has_theme_style" || pf == "has_theme_style_override" || pf == "get_theme_style") {
|
||||
@@ -230,6 +231,7 @@ void Control::get_argument_options(const StringName &p_function, int p_idx, List
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
PackedStringArray Control::get_configuration_warnings() const {
|
||||
ERR_READ_THREAD_GUARD_V(PackedStringArray());
|
||||
|
||||
Reference in New Issue
Block a user