diff options
Diffstat (limited to 'editor/editor_interface.cpp')
-rw-r--r-- | editor/editor_interface.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/editor/editor_interface.cpp b/editor/editor_interface.cpp index af1d23a4fe..bad28ff43d 100644 --- a/editor/editor_interface.cpp +++ b/editor/editor_interface.cpp @@ -35,13 +35,13 @@ #include "editor/editor_node.h" #include "editor/editor_paths.h" #include "editor/editor_resource_preview.h" -#include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "editor/editor_undo_redo_manager.h" #include "editor/filesystem_dock.h" #include "editor/gui/editor_run_bar.h" #include "editor/inspector_dock.h" #include "editor/plugins/node_3d_editor_plugin.h" +#include "editor/themes/editor_scale.h" #include "main/main.h" #include "scene/gui/box_container.h" #include "scene/gui/control.h" @@ -400,6 +400,21 @@ bool EditorInterface::is_movie_maker_enabled() const { } // Base. +void EditorInterface::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const { + String pf = p_function; + if (p_idx == 0) { + if (pf == "set_main_screen_editor") { + for (String E : { "\"2D\"", "\"3D\"", "\"Script\"", "\"AssetLib\"" }) { + r_options->push_back(E); + } + } else if (pf == "get_editor_viewport_3d") { + for (uint32_t i = 0; i < Node3DEditor::VIEWPORTS_COUNT; i++) { + r_options->push_back(String::num_int64(i)); + } + } + } + Object::get_argument_options(p_function, p_idx, r_options); +} void EditorInterface::_bind_methods() { ClassDB::bind_method(D_METHOD("restart_editor", "save"), &EditorInterface::restart_editor, DEFVAL(true)); |