mirror of
https://github.com/godotengine/godot.git
synced 2025-02-12 05:40:58 +00:00
expose bottom panel button to EditorPlugin scripts
This commit is contained in:
parent
85f365bbff
commit
ed094d52a9
@ -44,9 +44,9 @@ void EditorPlugin::remove_custom_type(const String& p_type){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditorPlugin::add_control_to_bottom_panel(Control *p_control, const String &p_title) {
|
ToolButton * EditorPlugin::add_control_to_bottom_panel(Control *p_control, const String &p_title) {
|
||||||
|
|
||||||
EditorNode::get_singleton()->add_bottom_panel_item(p_title,p_control);
|
return EditorNode::get_singleton()->add_bottom_panel_item(p_title,p_control);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorPlugin::add_control_to_dock(DockSlot p_slot,Control *p_control) {
|
void EditorPlugin::add_control_to_dock(DockSlot p_slot,Control *p_control) {
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#ifndef EDITOR_PLUGIN_H
|
#ifndef EDITOR_PLUGIN_H
|
||||||
#define EDITOR_PLUGIN_H
|
#define EDITOR_PLUGIN_H
|
||||||
|
|
||||||
|
#include "scene/gui/tool_button.h"
|
||||||
#include "scene/main/node.h"
|
#include "scene/main/node.h"
|
||||||
#include "scene/resources/texture.h"
|
#include "scene/resources/texture.h"
|
||||||
#include "undo_redo.h"
|
#include "undo_redo.h"
|
||||||
@ -92,7 +93,7 @@ public:
|
|||||||
//TODO: send a resoucre for editing to the editor node?
|
//TODO: send a resoucre for editing to the editor node?
|
||||||
|
|
||||||
void add_control_to_container(CustomControlContainer p_location, Control *p_control);
|
void add_control_to_container(CustomControlContainer p_location, Control *p_control);
|
||||||
void add_control_to_bottom_panel(Control *p_control, const String &p_title);
|
ToolButton *add_control_to_bottom_panel(Control *p_control, const String &p_title);
|
||||||
void add_control_to_dock(DockSlot p_slot,Control *p_control);
|
void add_control_to_dock(DockSlot p_slot,Control *p_control);
|
||||||
void remove_control_from_docks(Control *p_control);
|
void remove_control_from_docks(Control *p_control);
|
||||||
void remove_control_from_bottom_panel(Control *p_control);
|
void remove_control_from_bottom_panel(Control *p_control);
|
||||||
|
Loading…
Reference in New Issue
Block a user