Show a menu on a given control.
Example - Basic usage
cfg.Light
cfg.MUI
function OnStart()
{
lay = MUI.CreateLayout("Linear", "VCenter,FillXY")
btn = MUI.CreateFabOutline("more_vert")
btn.SetOnTouch(btn_OnTouch)
lay.AddChild(btn)
app.AddLayout(lay)
}
function btn_OnTouch() {
menu = MUI.ShowMenu(this, "Item 1, Item 2, Item 3")
menu.SetOnSelect(function(item) {
app.ShowPopup(item)
})
}