Class MarkerMenu : addItem Method
void addItem( String menuText, function callback, [ String parameter ] ) |
Summary
Adds an item to the menu
Remarks
Items get added to the "end" of the current menu.
Parameters
Parameter | Description |
String menuText |
|
function callback |
|
String parameter [optional] |
Optional parameter to pass to the callback function if this item is selected. |
|
|
|
Examples
Code below taken from the Video Markervar template = new MarkerTemplate( strName, 4, true ); template.onProgrammeMenuShow = function( menu, marker, programme ) { if( marker ) { menu.addItem( "Don't video this programme", "onVideo");
if( marker.programmeName == "" ) { menu.addItem( marker.programme.getParsedInfo( "Exclude|'$ProgrammeName' from '" + marker. markerName + "' marker" ), "onExclude" ); } } else { if( !programme.isOld() ) { menu.addItem( "Video this programme", "onVideo" ); } } }
|
See Also
MarkerTemplate : onProgrammeMenuShow
Requirements
Build 1059
|