You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Extract BottomPanel from EditorNode
This commit is contained in:
@@ -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.
|
||||
@@ -790,7 +791,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();
|
||||
|
||||
@@ -2192,7 +2193,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();
|
||||
}
|
||||
@@ -2200,7 +2201,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() {
|
||||
|
||||
Reference in New Issue
Block a user