OverlayMenuEntry

Methods
6
Fields
None

Getting one

OverlayMenuEntry.new(…)
Overlay.new(…):addMenuEntry(…)

Methods

MethodReturnsDescription
getMenuAction()MenuActionThe entry's MenuAction.
getOption()stringThe option text.
getTarget()stringThe target text.
equals(any)booleanWhether other is an entry with the same action, option and target (the callback is not compared).
toString()stringThe text form: OverlayMenuEntry(menuAction=..., option=..., target=...).
new(MenuAction, string, string)OverlayMenuEntryAn entry with no callback: picking it posts OverlayMenuClicked.

Returned by

MethodReturnsDescription
InfoBox.getMenuEntries{OverlayMenuEntry}The live list of the box's shift-right-click entries (the manager adds Detach, Flip and, outside the default group, Delete).
Overlay.addMenuEntryOverlayMenuEntry(Overlay, MenuAction, string, string) -> OverlayMenuEntry: Adds a shift-right-click entry; picking it posts OverlayMenuClicked.
Overlay.getMenuEntries{OverlayMenuEntry}The live list of entries: table.insert adds.
OverlayMenuClicked.getEntryOverlayMenuEntryThe entry picked: the overlay's plugin's own object there, an equal copy in another plugin.
OverlayMenuEntryClass.newOverlayMenuEntryAn entry with no callback: picking it posts OverlayMenuClicked.

Method details

equals

equals: (OverlayMenuEntry, any) -> boolean

Whether other is an entry with the same action, option and target (the callback is not compared).