diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-05-28 18:38:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-28 18:38:32 +0200 |
commit | 81ac52599d6578a5fe1e9f8021c0ad568784e139 (patch) | |
tree | d9a12edf5c284ec9475bb355ca6f3cc50c7cf8f0 | |
parent | 3a365c1fc0b9fff27d767cbcf0e1801ec54b257c (diff) | |
parent | be341e1931b8e49a14a89e8b38caca8e41c6b38b (diff) |
Merge pull request #29239 from fire/plugin_editor_settings
Be able to add to the editor setting tabs.
-rw-r--r-- | editor/editor_plugin.cpp | 20 | ||||
-rw-r--r-- | editor/editor_plugin.h | 4 |
2 files changed, 23 insertions, 1 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 8af4ee8017..56fc1f87a5 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -400,6 +400,18 @@ void EditorPlugin::add_control_to_container(CustomControlContainer p_location, C EditorNode::get_singleton()->get_inspector_dock_addon_area()->add_child(p_control); } break; + case CONTAINER_PROJECT_SETTING_TAB_LEFT: { + + ProjectSettingsEditor::get_singleton()->get_tabs()->add_child(p_control); + ProjectSettingsEditor::get_singleton()->get_tabs()->move_child(p_control, 0); + + } break; + case CONTAINER_PROJECT_SETTING_TAB_RIGHT: { + + ProjectSettingsEditor::get_singleton()->get_tabs()->add_child(p_control); + ProjectSettingsEditor::get_singleton()->get_tabs()->move_child(p_control, 1); + + } break; } } @@ -450,6 +462,12 @@ void EditorPlugin::remove_control_from_container(CustomControlContainer p_locati EditorNode::get_singleton()->get_inspector_dock_addon_area()->remove_child(p_control); } break; + case CONTAINER_PROJECT_SETTING_TAB_LEFT: + case CONTAINER_PROJECT_SETTING_TAB_RIGHT: { + + ProjectSettingsEditor::get_singleton()->get_tabs()->remove_child(p_control); + + } break; } } @@ -863,6 +881,8 @@ void EditorPlugin::_bind_methods() { BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_SIDE_RIGHT); BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_BOTTOM); BIND_ENUM_CONSTANT(CONTAINER_PROPERTY_EDITOR_BOTTOM); + BIND_ENUM_CONSTANT(CONTAINER_PROJECT_SETTING_TAB_LEFT); + BIND_ENUM_CONSTANT(CONTAINER_PROJECT_SETTING_TAB_RIGHT); BIND_ENUM_CONSTANT(DOCK_SLOT_LEFT_UL); BIND_ENUM_CONSTANT(DOCK_SLOT_LEFT_BL); diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index 2fcc487377..ba4df35e66 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -137,7 +137,9 @@ public: CONTAINER_CANVAS_EDITOR_SIDE_LEFT, CONTAINER_CANVAS_EDITOR_SIDE_RIGHT, CONTAINER_CANVAS_EDITOR_BOTTOM, - CONTAINER_PROPERTY_EDITOR_BOTTOM + CONTAINER_PROPERTY_EDITOR_BOTTOM, + CONTAINER_PROJECT_SETTING_TAB_LEFT, + CONTAINER_PROJECT_SETTING_TAB_RIGHT, }; enum DockSlot { |