Widget

public class Widget implements Clickable, Actionable, Indexable

Represents an on-screen UI element that is drawn on the game canvas

See also

Constructors

Widget
Link copied to clipboard
void Widget(RSInterface rsInterface)

Functions

click
Link copied to clipboard
boolean click()
Interacts with the entity, with the first action available.
boolean click(String action)
Interacts with the entity, given a specific action.
dragTo
Link copied to clipboard
boolean dragTo(Widget destination)
Drags this widget to the destination widget
getActions
Link copied to clipboard
List<StringgetActions()
Gets the available actions for the entity, usually dependent on their definition.
getAnimationId
Link copied to clipboard
int getAnimationId()
Gets the widget animation ID
getBounds
Link copied to clipboard
Rectangle getBounds()
getChild
Link copied to clipboard
Optional<WidgetgetChild(int index)
Gets the child of this widget at the specified index
getChildren
Link copied to clipboard
List<WidgetgetChildren()
getIndex
Link copied to clipboard
int getIndex()
Gets the index of the entity.
getIndexPath
Link copied to clipboard
Array<int> getIndexPath()
getItemStack
Link copied to clipboard
int getItemStack()
getLegacyInterface
Link copied to clipboard
RSInterface getLegacyInterface()
Not exposed
getModelId
Link copied to clipboard
int getModelId()
Gets this widget's model id.
getName
Link copied to clipboard
Optional<StringgetName()
Returns the name of this widget, if one exists.
getParent
Link copied to clipboard
Optional<WidgetgetParent()
Gets the parent of this widget in the widget tree
getSibling
Link copied to clipboard
Optional<WidgetgetSibling(int siblingOffset)
Gets a sibling of this widget from the specified offset
getText
Link copied to clipboard
Optional<StringgetText()
getTextColor
Link copied to clipboard
int getTextColor()
Gets the text color of this widget as an rgb color
getTextureId
Link copied to clipboard
int getTextureId()
Gets the widget texture ID
hover
Link copied to clipboard
boolean hover()
Moves the mouse to a human-randomized point on the entity.
boolean hover(String action)
Hovers the specified action on this entity.
hoverMenu
Link copied to clipboard
boolean hoverMenu(String action)
Hovers the specified action on this entity, always right-clicking and hovering over the menu
isHovering
Link copied to clipboard
boolean isHovering()
Checks if the mouse is currently over this entity
isVisible
Link copied to clipboard
boolean isVisible()
Determines if the entity is on the screen and able to be clicked.
scrollTo
Link copied to clipboard
boolean scrollTo()
Scroll to the desired widget
toItemDefinition
Link copied to clipboard
Optional<ItemDefinitiontoItemDefinition()
toString
Link copied to clipboard
String toString()
toWidgetItem
Link copied to clipboard
Optional<ItemtoWidgetItem()
toWidgetItemTable
Link copied to clipboard
List<ItemtoWidgetItemTable()