I can make single items work that aren't in a submenu, but if I give it the property of submenu with an array (like specified in these docs), it's stays as a single item with no menu of children that fold out.
ie. in the code below, all I get is a single item named "Auto crossfade settings".
Please note that I've tried adding in order and grouporder values, and removing the 3rd level of submenu, but haven't seen any difference.
I'm adding this code in trackListView_add.js
Code: Select all
window.menus.tracklistMenuItems.push({
action: {
title: 'Auto crossfade settings',
// icon: String,
visible: () => uitools.getCanEdit(),
},
// order: Number, // Required
// grouporder: Number, // Required
submenu: [
{
action: {title: 'Selected tracks'},
submenu: [
{action: actions.autoCrossfadeTrack},
{action: actions.alwaysCrossfadeTrack},
{action: actions.neverCrossfadeTrack}
]
},
{
action: {title: 'Entire <insert name> genre'},
submenu: [
{action: actions.autoCrossfadeTrack},
{action: actions.alwaysCrossfadeTrack},
{action: actions.neverCrossfadeTrack}
]
},
{
action: {title: 'Entire <insert name> mood'},
submenu: [
{action: actions.autoCrossfadeTrack},
{action: actions.alwaysCrossfadeTrack},
{action: actions.neverCrossfadeTrack}
]
},
{
action: {title: 'Entire <insert name> collection'},
submenu: [
{action: actions.autoCrossfadeTrack},
{action: actions.alwaysCrossfadeTrack},
{action: actions.neverCrossfadeTrack}
]
},
]
})