summaryrefslogtreecommitdiffstats
path: root/modules/multiplayer
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 /modules/multiplayer
parent1aab6e96b96af734d1fe5979d30d1a4232cb270d (diff)
downloadredot-engine-eb6ca91ba6f04a4ff2e21b3ca097c92b6a68dbc8.tar.gz
Extract BottomPanel from EditorNode
Diffstat (limited to 'modules/multiplayer')
-rw-r--r--modules/multiplayer/editor/multiplayer_editor_plugin.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/multiplayer/editor/multiplayer_editor_plugin.cpp b/modules/multiplayer/editor/multiplayer_editor_plugin.cpp
index af2db543c0..e8dfc3379c 100644
--- a/modules/multiplayer/editor/multiplayer_editor_plugin.cpp
+++ b/modules/multiplayer/editor/multiplayer_editor_plugin.cpp
@@ -36,6 +36,7 @@
#include "editor/editor_interface.h"
#include "editor/editor_node.h"
+#include "editor/gui/editor_bottom_panel.h"
void MultiplayerEditorDebugger::_bind_methods() {
ADD_SIGNAL(MethodInfo("open_request", PropertyInfo(Variant::STRING, "path")));
@@ -112,7 +113,7 @@ void MultiplayerEditorDebugger::setup_session(int p_session_id) {
MultiplayerEditorPlugin::MultiplayerEditorPlugin() {
repl_editor = memnew(ReplicationEditor);
- button = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Replication"), repl_editor);
+ button = EditorNode::get_bottom_panel()->add_item(TTR("Replication"), repl_editor);
button->hide();
repl_editor->get_pin()->connect("pressed", callable_mp(this, &MultiplayerEditorPlugin::_pinned));
debugger.instantiate();
@@ -139,7 +140,7 @@ void MultiplayerEditorPlugin::_node_removed(Node *p_node) {
if (p_node && p_node == repl_editor->get_current()) {
repl_editor->edit(nullptr);
if (repl_editor->is_visible_in_tree()) {
- EditorNode::get_singleton()->hide_bottom_panel();
+ EditorNode::get_bottom_panel()->hide_bottom_panel();
}
button->hide();
repl_editor->get_pin()->set_pressed(false);
@@ -149,7 +150,7 @@ void MultiplayerEditorPlugin::_node_removed(Node *p_node) {
void MultiplayerEditorPlugin::_pinned() {
if (!repl_editor->get_pin()->is_pressed()) {
if (repl_editor->is_visible_in_tree()) {
- EditorNode::get_singleton()->hide_bottom_panel();
+ EditorNode::get_bottom_panel()->hide_bottom_panel();
}
button->hide();
}
@@ -166,10 +167,10 @@ bool MultiplayerEditorPlugin::handles(Object *p_object) const {
void MultiplayerEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
button->show();
- EditorNode::get_singleton()->make_bottom_panel_item_visible(repl_editor);
+ EditorNode::get_bottom_panel()->make_item_visible(repl_editor);
} else if (!repl_editor->get_pin()->is_pressed()) {
if (repl_editor->is_visible_in_tree()) {
- EditorNode::get_singleton()->hide_bottom_panel();
+ EditorNode::get_bottom_panel()->hide_bottom_panel();
}
button->hide();
}