#What is a ''hybrid parent''?
6 messages · Page 1 of 1 (latest)
You can achieve this by defining a menu entry with both a click() event and a children: [] list
Hmmm, doesn't seem to be working for me
I don't know if I did it correctly
My code looks like this:
name: "Hybrid Parent",
icon: "person",
click: () => {
Blockbench.showQuickMessage("You clicked on a hybrid parent!");
},
children: [
new Action("hybrid_parent_child_test", {
name: "thing inside",
icon: "directions_walk",
click: () => {
Blockbench.showQuickMessage("Item inside a hybrid parent");
},
}),
],
});```
Yeah this is for menu items, not for actions.
However since 4.4 you can also achieve a similar result using side menus. Example from the plugin store action:
new Action('plugins_window', {
icon: 'extension',
category: 'blockbench',
side_menu: new Menu('plugins_window', [
'load_plugin',
'load_plugin_from_url'
]),
click(e) {
Plugins.dialog.show();
}
})