Package net.runelite.client.menus
Class WidgetMenuOption
- java.lang.Object
-
- net.runelite.client.menus.WidgetMenuOption
-
public final class WidgetMenuOption extends Object
-
-
Constructor Summary
Constructors Constructor Description WidgetMenuOption(String menuOption, String menuTarget, int... widgetIds)Creates a menu to be added to right click menus.WidgetMenuOption(String menuOption, String menuTarget, WidgetInfo widget)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetColor()The color that the menuTarget should be.StringgetMenuOption()The left hand text to be displayed on the menu option.StringgetMenuTarget()The right hand text to be displayed on the menu option.voidsetColor(Color color)The color that the menuTarget should be.voidsetMenuOption(String menuOption)The left hand text to be displayed on the menu option.voidsetMenuTarget(String target)Sets the target of the menu option.
-
-
-
Constructor Detail
-
WidgetMenuOption
@Deprecated public WidgetMenuOption(String menuOption, String menuTarget, WidgetInfo widget)
Deprecated.Creates a menu to be added to right click menus. The menu will only be added if match is found within the menu options- Parameters:
menuOption- Option text of this right click optionmenuTarget- Target text of this right click optionwidget- The widget to attach this option to
-
WidgetMenuOption
public WidgetMenuOption(String menuOption, String menuTarget, int... widgetIds)
Creates a menu to be added to right click menus. The menu will only be added if match is found within the menu options- Parameters:
menuOption- Option text of this right click optionmenuTarget- Target text of this right click optionwidgetIds- The widgets to attach this option to
-
-
Method Detail
-
setMenuTarget
public void setMenuTarget(String target)
Sets the target of the menu option. Color code will be added on to target- Parameters:
target- The target text without color code.
-
getMenuOption
public String getMenuOption()
The left hand text to be displayed on the menu option. (ex. the menuOption of "Drop Bones" is "Drop")
-
setMenuOption
public void setMenuOption(String menuOption)
The left hand text to be displayed on the menu option. (ex. the menuOption of "Drop Bones" is "Drop")
-
getMenuTarget
public String getMenuTarget()
The right hand text to be displayed on the menu option. (ex. the menuTarget of "Drop Bones" is "Bones")
-
getColor
public Color getColor()
The color that the menuTarget should be. Defaults to the brownish color that most menu options have.
-
setColor
public void setColor(Color color)
The color that the menuTarget should be. Defaults to the brownish color that most menu options have.
-
-