@Sn00py Ich habe wirklich noch nie einen größeren Clown gesehen als dich. Du glaubst das ein Copyright-Verstoß dein Problem ist? Alter du hast größere Probleme mit dir selber, und jetzt mit der Anzeige. xD
This is very nice and very simple to use.
The documentation could be expanded a bit, I had to read through the js to determine how to update a UIMenuListItem's values. If anyone is interested, here is how I did it:
// import the lib
const ui = require("./nativeui.js");
// Save a reference to the menu item being created
const menuListItem = new ui.UIMenuListItem(
"menu item text",
"menu item description goes here",
new ui.ItemsCollection(["this", "is", "the", "list", "when", "menu", "created"])
);
// add it to the menu
menu.AddItem(menuListItem);
// then later in the code, update the list with the following:
menuListItem.Collection = new ui.ItemsCollection(["this", "is", "the", "new", "values"]).getListItems();
What I was trying to do was assign a new ui.ItemsCollection object to menuListItem.Collection. The result was that all the fields were empty. Note also, in my case, the number of entries doesn't change (unlike the example above) so I don't know what the resulting behaviour is. I'm sure the library can handle it.