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 widgetId)
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 Color
getColor()
The color that the menuTarget should be.String
getMenuOption()
The left hand text to be displayed on the menu option.String
getMenuTarget()
The right hand text to be displayed on the menu option.WidgetInfo
getWidget()
The widgetinfo to add the option to, if availableint
getWidgetId()
The widget to add the option tovoid
setColor(Color color)
The color that the menuTarget should be.void
setMenuOption(String menuOption)
The left hand text to be displayed on the menu option.void
setMenuTarget(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 widgetId)
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 optionwidgetId
- The widget 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.
-
getWidget
@Nullable public WidgetInfo getWidget()
The widgetinfo to add the option to, if available
-
getWidgetId
public int getWidgetId()
The widget to add the option to
-
-