SetMenu

The SetMenu function sets the app menus given a comma seperated list of menu items. When a menu item is selected, the OnMenu function is called.

You can also show menu images by setting an image path and adding an image name to each menu item preceeded by a semi-colon.

 app.SetMenu( menuList, imageFolder );

Example - No Images

function OnStart()
{
  app.SetMenu( "Start,Stop,Pause" );
}

function OnMenu( item )
{
  app.ShowPopup( item, "Short" );
}
  Copy   Copy All    Run   

Example - Menu Images

function OnStart()
{
  menus = "Files:Files.png,Settings:Settings.png";
  app.SetMenu( menus, "/sdcard/IOIOScript/Img" );
}

function OnMenu( item )
{
  app.ShowPopup( item, "Short" );
}
  Copy   Copy All    Run