I tried to implement the new flyout menu as documented in the recipes, however trying to run the script i get an error stating:
Error: Could not find panel menuItems in manifest
I’m not sure if i’m missing something or what, is there something more i need to implement to get it to recognize and render the flyout menu?
Heres my entry points:
entrypoints.setup({
plugin: {
create(plugin) {
/* optional */ console.log("created")
},
destroy() {
/* optional */ console.log("destroyed")
},
},
panels: {
index_AR: index_AR_Controller,
menuItems: [
{ id: "setWarpFactor", label: "Warp Factor 1" },
{ id: "raiseShields", label: "Shields Up" },
{ id: "makeItSo", label: "Engage" },
],
invokeMenu(id) {
handleFlyout(id)
},
},
})
the handle flyout function:
function handleFlyout(id) {
switch (id) {
case "setWarpFactor": {
console.log("Aye captain")
break
}
case "raiseShields": {
console.log("Shields at 40 percent")
break
}
case "makeItSo": {
console.log("Warp drive is offline")
break
}
}
}
and my manifest entry points:
"entrypoints": [
{
"type": "panel",
"id": "index_AR",
"label": {
"default": "Index AR"
},
"minimumSize": {
"width": 230,
"height": 200
},
"maximumSize": {
"width": 2000,
"height": 2000
},
"preferredDockedSize": {
"width": 230,
"height": 250
},
"preferredFloatingSize": {
"width": 230,
"height": 250
},
"menuItems": [
{ "id": "setWarpFactor", "label": "Warp Factor 1" },
{ "id": "raiseShields", "label": "Shields Up" },
{ "id": "makeItSo", "label": "Engage" }
],
"icons": [
{
"width": 23,
"height": 23,
"path": "icons/indexBookIcon.png",
"scale": [1, 2],
"theme": ["all"],
"species": ["generic"]
}
]
}
],