summaryrefslogtreecommitdiff
path: root/tools/editor/editor_plugin.cpp
diff options
context:
space:
mode:
authorZher Huei Lee <lee.zh.92@gmail.com>2016-02-28 19:58:17 +0000
committerZher Huei Lee <lee.zh.92@gmail.com>2016-02-28 19:58:17 +0000
commitd8ac5cff579bb454b945eaf6c47f4240fb431570 (patch)
tree10460139f3d9121011bbda26eba7f697b7076008 /tools/editor/editor_plugin.cpp
parent6fc1c3a4d1cf0c865f7dfdb1221ef07a5d25f305 (diff)
Adds EditorPlugin::remove_control_from_bottom_panel()
Also renames `add_control_to_bottom_dock` to `add_control_to_bottom_panel` so that it would be clear that the removal functions are different too.
Diffstat (limited to 'tools/editor/editor_plugin.cpp')
-rw-r--r--tools/editor/editor_plugin.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/editor/editor_plugin.cpp b/tools/editor/editor_plugin.cpp
index 89b9c59287..dc46361251 100644
--- a/tools/editor/editor_plugin.cpp
+++ b/tools/editor/editor_plugin.cpp
@@ -43,7 +43,7 @@ void EditorPlugin::remove_custom_type(const String& p_type){
}
-void EditorPlugin::add_control_to_bottom_dock(Control *p_control, const String &p_title) {
+void EditorPlugin::add_control_to_bottom_panel(Control *p_control, const String &p_title) {
EditorNode::get_singleton()->add_bottom_panel_item(p_title,p_control);
}
@@ -62,6 +62,13 @@ void EditorPlugin::remove_control_from_docks(Control *p_control) {
}
+void EditorPlugin::remove_control_from_bottom_panel(Control *p_control) {
+
+ ERR_FAIL_NULL(p_control);
+ EditorNode::get_singleton()->remove_bottom_panel_item(p_control);
+
+}
+
void EditorPlugin::add_control_to_container(CustomControlContainer p_location,Control *p_control) {
switch(p_location) {
@@ -270,9 +277,10 @@ Control *EditorPlugin::get_base_control() {
void EditorPlugin::_bind_methods() {
ObjectTypeDB::bind_method(_MD("add_control_to_container","container","control:Control"),&EditorPlugin::add_control_to_container);
- ObjectTypeDB::bind_method(_MD("add_control_to_bottom_dock","control:Control","title"),&EditorPlugin::add_control_to_bottom_dock);
+ ObjectTypeDB::bind_method(_MD("add_control_to_bottom_panel","control:Control","title"),&EditorPlugin::add_control_to_bottom_panel);
ObjectTypeDB::bind_method(_MD("add_control_to_dock","slot","control:Control"),&EditorPlugin::add_control_to_dock);
ObjectTypeDB::bind_method(_MD("remove_control_from_docks","control:Control"),&EditorPlugin::remove_control_from_docks);
+ ObjectTypeDB::bind_method(_MD("remove_control_from_bottom_panel","control:Control"),&EditorPlugin::remove_control_from_bottom_panel);
ObjectTypeDB::bind_method(_MD("add_custom_type","type","base","script:Script","icon:Texture"),&EditorPlugin::add_custom_type);
ObjectTypeDB::bind_method(_MD("remove_custom_type","type"),&EditorPlugin::remove_custom_type);