You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Added tool menu functions in EditorPlugin
This commit is contained in:
@@ -421,21 +421,18 @@ void EditorPlugin::remove_control_from_container(CustomControlContainer p_locati
|
||||
}
|
||||
|
||||
void EditorPlugin::add_tool_menu_item(const String &p_name, Object *p_handler, const String &p_callback, const Variant &p_ud) {
|
||||
|
||||
//EditorNode::get_singleton()->add_tool_menu_item(p_name, p_handler, p_callback, p_ud);
|
||||
EditorNode::get_singleton()->add_tool_menu_item(p_name, p_handler, p_callback, p_ud);
|
||||
}
|
||||
|
||||
void EditorPlugin::add_tool_submenu_item(const String &p_name, Object *p_submenu) {
|
||||
|
||||
ERR_FAIL_NULL(p_submenu);
|
||||
PopupMenu *submenu = Object::cast_to<PopupMenu>(p_submenu);
|
||||
ERR_FAIL_NULL(submenu);
|
||||
//EditorNode::get_singleton()->add_tool_submenu_item(p_name, submenu);
|
||||
EditorNode::get_singleton()->add_tool_submenu_item(p_name, submenu);
|
||||
}
|
||||
|
||||
void EditorPlugin::remove_tool_menu_item(const String &p_name) {
|
||||
|
||||
//EditorNode::get_singleton()->remove_tool_menu_item(p_name);
|
||||
EditorNode::get_singleton()->remove_tool_menu_item(p_name);
|
||||
}
|
||||
|
||||
void EditorPlugin::set_input_event_forwarding_always_enabled() {
|
||||
@@ -699,9 +696,9 @@ void EditorPlugin::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("remove_control_from_docks", "control"), &EditorPlugin::remove_control_from_docks);
|
||||
ClassDB::bind_method(D_METHOD("remove_control_from_bottom_panel", "control"), &EditorPlugin::remove_control_from_bottom_panel);
|
||||
ClassDB::bind_method(D_METHOD("remove_control_from_container", "container", "control"), &EditorPlugin::remove_control_from_container);
|
||||
//ClassDB::bind_method(D_METHOD("add_tool_menu_item", "name", "handler", "callback", "ud"),&EditorPlugin::add_tool_menu_item,DEFVAL(Variant()));
|
||||
ClassDB::bind_method(D_METHOD("add_tool_menu_item", "name", "handler", "callback", "ud"), &EditorPlugin::add_tool_menu_item, DEFVAL(Variant()));
|
||||
ClassDB::bind_method(D_METHOD("add_tool_submenu_item", "name", "submenu"), &EditorPlugin::add_tool_submenu_item);
|
||||
//ClassDB::bind_method(D_METHOD("remove_tool_menu_item", "name"),&EditorPlugin::remove_tool_menu_item);
|
||||
ClassDB::bind_method(D_METHOD("remove_tool_menu_item", "name"), &EditorPlugin::remove_tool_menu_item);
|
||||
ClassDB::bind_method(D_METHOD("add_custom_type", "type", "base", "script", "icon"), &EditorPlugin::add_custom_type);
|
||||
ClassDB::bind_method(D_METHOD("remove_custom_type", "type"), &EditorPlugin::remove_custom_type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user