summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorK. S. Ernest (iFIre) Lee <ernest.lee@chibifire.com>2019-05-27 13:33:52 -0700
committerK. S. Ernest (iFIre) Lee <ernest.lee@chibifire.com>2019-05-28 05:11:01 -0700
commitbe341e1931b8e49a14a89e8b38caca8e41c6b38b (patch)
treeaa20455421a04c4da97d73eaf283dfe1855ca2ec
parent25e36f35404c076edb445d0fe595b694db57536d (diff)
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 {