Set the app menu fields.
When a menu entry is touched, the global OnMenu event will be called.
See Also: ShowMenu
Example - Example
function OnStart()
{
app.SetMenu( "Start,Stop,Pause" );
lay = app.CreateLayout( "linear", "" );
btn = app.CreateButton( "[fa-gear]", -1, -1, "fontawesome" );
btn.SetOnTouch( app.ShowMenu );
lay.AddChild( btn );
app.AddLayout( lay );
}
function OnMenu( item )
{
app.ShowPopup( item, "Short" );
}
Example - Menu Icons
function OnStart()
{
menus = "Files:folder,Music:list,Images:picture";
app.SetMenu( menus );
app.ShowMenu();
}
function OnMenu( item )
{
app.ShowPopup( item, "Short" );
}