1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Merge pull request #87760 from kitbdev/extract-bottom-dock

Extract BottomPanel from EditorNode
This commit is contained in:
Rémi Verschelde
2024-02-23 22:18:50 +01:00
22 changed files with 438 additions and 315 deletions

View File

@@ -38,6 +38,7 @@
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/gui/editor_bottom_panel.h"
#include "editor/gui/editor_file_dialog.h"
#include "editor/inspector_dock.h"
#include "editor/plugins/canvas_item_editor_plugin.h" // For onion skinning.
@@ -793,7 +794,7 @@ void AnimationPlayerEditor::set_state(const Dictionary &p_state) {
}
_update_player();
EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
EditorNode::get_bottom_panel()->make_item_visible(this);
set_process(true);
ensure_visibility();
@@ -2266,7 +2267,7 @@ bool AnimationPlayerEditorPlugin::handles(Object *p_object) const {
void AnimationPlayerEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
EditorNode::get_singleton()->make_bottom_panel_item_visible(anim_editor);
EditorNode::get_bottom_panel()->make_item_visible(anim_editor);
anim_editor->set_process(true);
anim_editor->ensure_visibility();
}
@@ -2274,7 +2275,7 @@ void AnimationPlayerEditorPlugin::make_visible(bool p_visible) {
AnimationPlayerEditorPlugin::AnimationPlayerEditorPlugin() {
anim_editor = memnew(AnimationPlayerEditor(this));
EditorNode::get_singleton()->add_bottom_panel_item(TTR("Animation"), anim_editor);
EditorNode::get_bottom_panel()->add_item(TTR("Animation"), anim_editor);
}
AnimationPlayerEditorPlugin::~AnimationPlayerEditorPlugin() {