MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / remove_tool_menu_item

Method remove_tool_menu_item

editor/editor_node.cpp:6413–6430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6411}
6412
6413void EditorNode::remove_tool_menu_item(const String &p_name) {
6414 for (int i = 0; i < tool_menu->get_item_count(); i++) {
6415 if (tool_menu->get_item_id(i) != TOOLS_CUSTOM) {
6416 continue;
6417 }
6418
6419 if (tool_menu->get_item_text(i) == p_name) {
6420 if (tool_menu->get_item_submenu(i) != "") {
6421 Node *n = tool_menu->get_node(tool_menu->get_item_submenu(i));
6422 tool_menu->remove_child(n);
6423 memdelete(n);
6424 }
6425 tool_menu->remove_item(i);
6426 tool_menu->reset_size();
6427 return;
6428 }
6429 }
6430}
6431
6432PopupMenu *EditorNode::get_export_as_menu() {
6433 return export_as_menu;

Callers

nothing calls this directly

Calls 9

memdeleteFunction · 0.85
get_item_countMethod · 0.45
get_item_idMethod · 0.45
get_item_textMethod · 0.45
get_item_submenuMethod · 0.45
get_nodeMethod · 0.45
remove_childMethod · 0.45
remove_itemMethod · 0.45
reset_sizeMethod · 0.45

Tested by

no test coverage detected