About Dialog.CreateMenu()

First, thanks for add this one :face_holding_back_tears:.

For me, when you click outside the menu, it returns 0, no -1, so how can you tell the difference between selecting the item with ID 0 and clicking outside the menu?

Related. I'm not sure if this is intended, but when creating submenus dynamically (each with their own items), if one of those submenus ends with no items, the script will throw an error when calling Menu.Show(). Disabling it has no effect on this error; you need to completely discard that submenu before showing the full menu.

We'll change that in the next update.