WidgetAPI
Widget API.
ClassRLPlugins API
public class WidgetAPIMembers
Static methods
- voidcloseInterface()
Sends the close packet and performs the matching local modal cleanup.
- voiddragWidget(Widget, Widget)
Drags one widget onto another.
- voiddragWidget(int, int, int, int, int, int)
Drags one widget onto another.
- Widgetget(WidgetInfo)
Get a widget by WidgetInfo.
- Widgetget(WidgetInfoExtended)
Get a widget by WidgetInfoExtended.
- Widgetget(int)
Get a widget by interfaceId.
- Widgetget(int, int)
Get a widget by groupId and childId.
- Widgetget(int, int, int)
Get a child widget by groupId, childId and child index.
- RectanglegetBounds(Widget)
Get widget bounds on the client thread.
- StringgetText(Widget)
Get the text of a widget.
- StringgetText(WidgetInfo)
Get the text of a widget.
- StringgetText(int)
Get the text of a widget.
- StringgetText(int, int)
Get the text of a widget.
- voidinteract(Widget, String...)
Invoke a widget action by first matching action name.
- voidinteract(Widget, int)
Invoke a widget action by action index.
- voidinteract(Widget, String, String)
Invoke a widget sub op packet.
- voidinteract(int, WidgetInfo, int)
Invoke a widget action.
- voidinteract(int, WidgetInfoExtended, int)
Invoke a widget action.
- voidinteract(int, int, int)
Invoke a widget action.
- voidinteract(int, WidgetInfo, int, int)
Invoke a widget action.
- voidinteract(int, WidgetInfoExtended, int, int)
Invoke a widget action.
- voidinteract(int, int, int, int)
Invoke a widget packet.
- voidinteract(int, int, int, int, int)
Invoke a widget packet.
- booleanisVisible(Widget)
Check if a widget is visible.
- booleanisVisible(int)
Check if a widget is visible.
- booleanisVisible(int, int)
Check if a widget is visible.
- voidonGroundItem(int, int, int, int, int, int, boolean)
Use a widget on a ground item.
- voidonNpc(Widget, NPC)
Use a widget on an NPC without holding ctrl.
- voidonNpc(Widget, NPC, boolean)
Use a widget on an NPC.
- voidonNpc(int, int, int, int, boolean)
Use a widget on an NPC.
- voidonPlayer(Widget, Player)
Use a widget on a player without holding ctrl.
- voidonPlayer(Widget, Player, boolean)
Use a widget on a player.
- voidonPlayer(int, int, int, int, boolean)
Use a widget on a player.
- voidonTileObject(Widget, TileObject)
Use a widget on a game object without holding ctrl.
- voidonTileObject(Widget, TileObject, boolean)
Use a widget on a game object.
- voidonTileObject(int, int, int, int, int, int, boolean)
Use a widget on a game object.
- voidonWidget(Widget, Widget)
Uses a widget on another widget.
- voidonWidget(int, int, int, int, int, int)
Use a widget on another widget.
- WidgetQuerysearch()
Creates an instance of WidgetQuery.
closeInterface()static
public static void closeInterface()Sends the close packet and performs the matching local modal cleanup.
Does not invoke CS2 or the native menu-action dispatcher.
dragWidget(Widget, Widget)static
public static void dragWidget(Widget source, Widget dest)Drags one widget onto another.
Parameters
source- Source.
dest- Dest.
dragWidget(int, int, int, int, int, int)static
public static void dragWidget(int widgetId, int itemId, int slot, int widgetId2, int itemId2, int slot2)Drags one widget onto another.
Parameters
widgetId- Widget id.
itemId- Item id.
slot- Slot.
widgetId2- Widget id2.
itemId2- Item id2.
slot2- Slot2.
get(WidgetInfo)static
public static Widget get(WidgetInfo info)Get a widget by WidgetInfo.
Parameters
info- Widget info.
Returns
Widget.
get(WidgetInfoExtended)static
public static Widget get(WidgetInfoExtended info)Get a widget by WidgetInfoExtended.
Parameters
info- Widget info.
Returns
Widget.
get(int)static
public static Widget get(int interfaceId)Get a widget by interfaceId.
Parameters
interfaceId- InterfaceId.
Returns
Widget.
get(int, int)static
public static Widget get(int groupId, int childId)Get a widget by groupId and childId.
Parameters
groupId- GroupId.
childId- ChildId.
Returns
Widget.
get(int, int, int)static
public static Widget get(int groupId, int childId, int child)Get a child widget by groupId, childId and child index.
Parameters
groupId- GroupId.
childId- ChildId.
child- Child index.
Returns
Widget.
getBounds(Widget)static
public static Rectangle getBounds(Widget widget)Get widget bounds on the client thread.
Parameters
widget- Widget.
Returns
Widget bounds, or empty rectangle when widget is null.
getText(Widget)static
public static String getText(Widget widget)Get the text of a widget.
Parameters
widget- Widget.
Returns
Text.
getText(WidgetInfo)static
public static String getText(WidgetInfo widgetInfo)Get the text of a widget.
Parameters
widgetInfo- Widget info.
Returns
Text.
getText(int)static
public static String getText(int widgetId)Get the text of a widget.
Parameters
widgetId- Widget id.
Returns
Text.
getText(int, int)static
public static String getText(int groupId, int childId)Get the text of a widget.
Parameters
groupId- GroupId.
childId- ChildId.
Returns
Text.
interact(Widget, String...)static
public static void interact(Widget widget, String... actions)Invoke a widget action by first matching action name.
Parameters
widget- Widget.
actions- Action list.
interact(Widget, int)static
public static void interact(Widget widget, int action)Invoke a widget action by action index.
Parameters
widget- Widget.
action- Action index.
interact(Widget, String, String)static
public static void interact(Widget widget, String menu, String action)Invoke a widget sub op packet.
Parameters
widget- Runelite Widget - should come from Inventory.
menu- Right click menu i.e "Rub".
action- Action insdie right click menu i.e "Grand Exchange".
interact(int, WidgetInfo, int)static
public static void interact(int action, WidgetInfo widgetInfo, int childId)Invoke a widget action.
Parameters
action- Action type.
widgetInfo- Widget info.
childId- Child ID.
interact(int, WidgetInfoExtended, int)static
public static void interact(int action, WidgetInfoExtended widgetInfo, int childId)Invoke a widget action.
Parameters
action- Action type.
widgetInfo- Widget info.
childId- Child ID.
interact(int, int, int)static
public static void interact(int action, int widgetId, int childId)Invoke a widget action.
Parameters
action- Action type.
widgetId- Widget iid.
childId- Child ID.
interact(int, WidgetInfo, int, int)static
public static void interact(int action, WidgetInfo widgetInfo, int childId, int itemId)Invoke a widget action.
Parameters
action- Action type.
widgetInfo- Widget info.
childId- Child ID.
itemId- Item ID.
interact(int, WidgetInfoExtended, int, int)static
public static void interact(int action, WidgetInfoExtended widgetInfo, int childId, int itemId)Invoke a widget action.
Parameters
action- Action type.
widgetInfo- Widget info.
childId- Child ID.
itemId- Item ID.
interact(int, int, int, int)static
public static void interact(int action, int widgetId, int childId, int itemId)Invoke a widget packet.
Parameters
action- Action type.
widgetId- Packed widget ID.
childId- Child ID.
itemId- Item ID.
interact(int, int, int, int, int)static
public static void interact(int action, int subOp, int widgetId, int childId, int itemId)Invoke a widget packet.
Parameters
action- Action type.
subOp- Sub op.
widgetId- Packed widget ID.
childId- Child ID.
itemId- Item ID.
isVisible(Widget)static
public static boolean isVisible(Widget widget)Check if a widget is visible.
Parameters
widget- Widget.
Returns
True if visible.
isVisible(int)static
public static boolean isVisible(int interfaceId)Check if a widget is visible.
Parameters
interfaceId- InterfaceId.
Returns
True if visible.
isVisible(int, int)static
public static boolean isVisible(int groupId, int childId)Check if a widget is visible.
Parameters
groupId- GroupId.
childId- ChildId.
Returns
True if visible.
onGroundItem(int, int, int, int, int, int, boolean)static
public static void onGroundItem(int selectedWidgetId, int itemId, int slot, int groundItemID, int worldX, int worldY, boolean ctrl)Use a widget on a ground item.
Parameters
selectedWidgetId- Selected widget ID.
itemId- Item ID.
slot- Slot.
groundItemID- Ground item ID.
worldX- WorldX.
worldY- WorldY.
ctrl- If ctrl is held.
onNpc(Widget, NPC)static
public static void onNpc(Widget source, NPC dest)Use a widget on an NPC without holding ctrl.
Parameters
source- Widget.
dest- Npc.
onNpc(Widget, NPC, boolean)static
public static void onNpc(Widget source, NPC dest, boolean ctrl)Use a widget on an NPC.
Parameters
source- Widget.
dest- Npc.
ctrl- If ctrl is held.
onNpc(int, int, int, int, boolean)static
public static void onNpc(int selectedWidgetId, int itemId, int slot, int npcIndex, boolean ctrl)Use a widget on an NPC.
Parameters
selectedWidgetId- Selected widget ID.
itemId- Item ID.
slot- Slot.
npcIndex- Npc index.
ctrl- If ctrl is held.
onPlayer(Widget, Player)static
public static void onPlayer(Widget source, Player dest)Use a widget on a player without holding ctrl.
Parameters
source- Widget.
dest- Player.
onPlayer(Widget, Player, boolean)static
public static void onPlayer(Widget source, Player dest, boolean ctrl)Use a widget on a player.
Parameters
source- Widget.
dest- Player.
ctrl- If ctrl is held.
onPlayer(int, int, int, int, boolean)static
public static void onPlayer(int selectedWidgetId, int itemId, int slot, int playerIndex, boolean ctrl)Use a widget on a player.
Parameters
selectedWidgetId- Selected widget ID.
itemId- Item ID.
slot- Slot.
playerIndex- Player index.
ctrl- If ctrl is held.
onTileObject(Widget, TileObject)static
public static void onTileObject(Widget source, TileObject dest)Use a widget on a game object without holding ctrl.
Parameters
source- Widget.
dest- Tile object.
onTileObject(Widget, TileObject, boolean)static
public static void onTileObject(Widget source, TileObject dest, boolean ctrl)Use a widget on a game object.
Parameters
source- Widget.
dest- Tile object.
ctrl- If ctrl is held.
onTileObject(int, int, int, int, int, int, boolean)static
public static void onTileObject(int selectedWidgetId, int itemId, int slot, int objectID, int worldX, int worldY, boolean ctrl)Use a widget on a game object.
Parameters
selectedWidgetId- Selected widget ID.
itemId- Item ID.
slot- Slot.
objectID- Object ID.
worldX- WorldX.
worldY- WorldY.
ctrl- If ctrl is held.
onWidget(Widget, Widget)static
public static void onWidget(Widget source, Widget dest)Uses a widget on another widget.
Parameters
source- Source widget.
dest- Destination widget.
onWidget(int, int, int, int, int, int)static
public static void onWidget(int selectedWidgetId, int itemId, int slot, int targetWidgetId, int itemId2, int slot2)Use a widget on another widget.
Parameters
selectedWidgetId- Selected widget ID.
itemId- Item ID.
slot- Slot.
targetWidgetId- Target widget ID.
itemId2- Target item ID.
slot2- Target slot.
search()static
public static WidgetQuery search()Creates an instance of WidgetQuery.
Returns
WidgetQuery.
Also allowed
Every class has these, as in plain Java.
equals, toString