WidgetMenuOption

Methods
8
Fields
None

Getting one

WidgetMenuOption.new(…)

Methods

MethodReturnsDescription
getMenuOption()stringThe option text ("Export" of "Export Ground Markers").
setMenuOption(string)()Set the option text; menus built from now on show it.
getMenuTarget()stringThe target text, with its colour tag (<col=ff9040>Ground Markers</col>).
setMenuTarget(string)()Set the target text, wrapped in the option's colour as it is now.
getColor()ColorThe colour the next setMenuTarget wraps the target in.
setColor(Color)()Set the colour; the target already set keeps its old colour until setMenuTarget is called again.
equals(any)booleanWhether other equals this WidgetMenuOption, as == answers it (false for a value of another class).
new(string, string, {number})WidgetMenuOptionWidgetMenuOption.new(menuOption, menuTarget, widgetId, ...): option text, target text (wrapped in the option's colour, `JagexColors.MENU_…

Returned by

MethodReturnsDescription
WidgetMenuOptionClass.newWidgetMenuOptionWidgetMenuOption.new(menuOption, menuTarget, widgetId, ...): option text, target text (wrapped in the option's colour, `JagexColors.MENU_…

Method details

setColor

setColor: (WidgetMenuOption, Color) -> ()

Set the colour; the target already set keeps its old colour until setMenuTarget is called again.

equals

equals: (WidgetMenuOption, any) -> boolean

Whether other equals this WidgetMenuOption, as == answers it (false for a value of another class).

new

new: (string, string, {number}) -> WidgetMenuOption

WidgetMenuOption.new(menuOption, menuTarget, widgetId, ...): option text, target text (wrapped in the option's colour, JagexColors.MENU_TARGET until setColor), and the packed ids of the widgets whose menus show it (pass them as arguments, or one array).