summaryrefslogtreecommitdiffstats
path: root/editor/editor_dock_manager.cpp
diff options
context:
space:
mode:
authorkit <kitbdev@gmail.com>2024-01-30 17:22:22 -0500
committerkit <kitbdev@gmail.com>2024-02-20 15:09:07 -0500
commiteb6ca91ba6f04a4ff2e21b3ca097c92b6a68dbc8 (patch)
tree9025a6550c2d70be14fa324e07bf5d4533d2c5bc /editor/editor_dock_manager.cpp
parent1aab6e96b96af734d1fe5979d30d1a4232cb270d (diff)
downloadredot-engine-eb6ca91ba6f04a4ff2e21b3ca097c92b6a68dbc8.tar.gz
Extract BottomPanel from EditorNode
Diffstat (limited to 'editor/editor_dock_manager.cpp')
-rw-r--r--editor/editor_dock_manager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/editor/editor_dock_manager.cpp b/editor/editor_dock_manager.cpp
index dc4c809860..a6b16a245d 100644
--- a/editor/editor_dock_manager.cpp
+++ b/editor/editor_dock_manager.cpp
@@ -42,6 +42,7 @@
#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
#include "editor/filesystem_dock.h"
+#include "editor/gui/editor_bottom_panel.h"
#include "editor/themes/editor_scale.h"
#include "editor/window_wrapper.h"
@@ -196,7 +197,7 @@ void EditorDockManager::_dock_select_input(const Ref<InputEvent> &p_input) {
if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && mb->is_pressed()) {
if (dock_bottom_selected_idx != -1) {
- EditorNode::get_singleton()->remove_bottom_panel_item(bottom_docks[dock_bottom_selected_idx]);
+ EditorNode::get_bottom_panel()->remove_item(bottom_docks[dock_bottom_selected_idx]);
bottom_docks[dock_bottom_selected_idx]->call("_set_dock_horizontal", false);
@@ -391,13 +392,13 @@ void EditorDockManager::_dock_move_selected_to_bottom() {
dock->call("_set_dock_horizontal", true);
bottom_docks.push_back(dock);
- EditorNode::get_singleton()->add_bottom_panel_item(dock->get_name(), dock, true);
+ EditorNode::get_bottom_panel()->add_item(dock->get_name(), dock, true);
dock_select_popup->hide();
update_dock_slots_visibility(true);
_edit_current();
emit_signal(SNAME("layout_changed"));
- EditorNode::get_singleton()->make_bottom_panel_item_visible(dock);
+ EditorNode::get_bottom_panel()->make_item_visible(dock);
}
void EditorDockManager::_dock_make_float(Control *p_dock, int p_slot_index, bool p_show_window) {
@@ -601,7 +602,7 @@ void EditorDockManager::load_docks_from_config(Ref<ConfigFile> p_layout, const S
dock_slot[atidx]->set_block_signals(false);
} else if (bottom_idx != -1) {
bottom_docks.erase(node);
- EditorNode::get_singleton()->remove_bottom_panel_item(node);
+ EditorNode::get_bottom_panel()->remove_item(node);
dock_slot[i]->add_child(node);
node->call("_set_dock_horizontal", false);
}
@@ -662,7 +663,7 @@ void EditorDockManager::load_docks_from_config(Ref<ConfigFile> p_layout, const S
node->call("_set_dock_horizontal", true);
bottom_docks.push_back(node);
- EditorNode::get_singleton()->add_bottom_panel_item(node->get_name(), node, true);
+ EditorNode::get_bottom_panel()->add_item(node->get_name(), node, true);
}
}