Package net.runelite.client.menus
Class WidgetMenuOption
- java.lang.Object
-
- net.runelite.client.menus.WidgetMenuOption
-
public final class WidgetMenuOption extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description WidgetMenuOption(java.lang.String menuOption, java.lang.String menuTarget, int widgetId)
Creates a menu to be added to right click menus.WidgetMenuOption(java.lang.String menuOption, java.lang.String menuTarget, net.runelite.api.widgets.WidgetInfo widget)
Creates a menu to be added to right click menus.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Color
getColor()
The color that the menuTarget should be.java.lang.String
getMenuOption()
The left hand text to be displayed on the menu option.java.lang.String
getMenuTarget()
The right hand text to be displayed on the menu option.net.runelite.api.widgets.WidgetInfo
getWidget()
The widgetinfo to add the option to, if availableint
getWidgetId()
The widget to add the option tovoid
setColor(java.awt.Color color)
The color that the menuTarget should be.void
setMenuOption(java.lang.String menuOption)
The left hand text to be displayed on the menu option.void
setMenuTarget(java.lang.String target)
Sets the target of the menu option.
-
-
-
Constructor Detail
-
WidgetMenuOption
public WidgetMenuOption(java.lang.String menuOption, java.lang.String menuTarget, net.runelite.api.widgets.WidgetInfo widget)
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(java.lang.String menuOption, java.lang.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(java.lang.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 java.lang.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(java.lang.String menuOption)
The left hand text to be displayed on the menu option. (ex. the menuOption of "Drop Bones" is "Drop")
-
getMenuTarget
public java.lang.String getMenuTarget()
The right hand text to be displayed on the menu option. (ex. the menuTarget of "Drop Bones" is "Bones")
-
getColor
public java.awt.Color getColor()
The color that the menuTarget should be. Defaults to the brownish color that most menu options have.
-
setColor
public void setColor(java.awt.Color color)
The color that the menuTarget should be. Defaults to the brownish color that most menu options have.
-
getWidget
@Nullable public net.runelite.api.widgets.WidgetInfo getWidget()
The widgetinfo to add the option to, if available
-
getWidgetId
public int getWidgetId()
The widget to add the option to
-
-