Optimise Object's get_argument_options

This commit is contained in:
Micky 2024-01-03 12:10:11 +01:00
parent bb6b06c813
commit cd2032a90b
33 changed files with 103 additions and 37 deletions

View file

@ -492,9 +492,9 @@ bool EditorInterface::is_movie_maker_enabled() const {
return EditorRunBar::get_singleton()->is_movie_maker_enabled();
}
// Base.
#ifdef TOOLS_ENABLED
void EditorInterface::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
String pf = p_function;
const String pf = p_function;
if (p_idx == 0) {
if (pf == "set_main_screen_editor") {
for (String E : { "\"2D\"", "\"3D\"", "\"Script\"", "\"AssetLib\"" }) {
@ -508,6 +508,9 @@ void EditorInterface::get_argument_options(const StringName &p_function, int p_i
}
Object::get_argument_options(p_function, p_idx, r_options);
}
#endif
// Base.
void EditorInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("restart_editor", "save"), &EditorInterface::restart_editor, DEFVAL(true));