summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-05-28 18:38:32 +0200
committerGitHub <noreply@github.com>2019-05-28 18:38:32 +0200
commit81ac52599d6578a5fe1e9f8021c0ad568784e139 (patch)
treed9a12edf5c284ec9475bb355ca6f3cc50c7cf8f0
parent3a365c1fc0b9fff27d767cbcf0e1801ec54b257c (diff)
parentbe341e1931b8e49a14a89e8b38caca8e41c6b38b (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.cpp20
-rw-r--r--editor/editor_plugin.h4
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 {