Widget

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

See also

Constructors

Link copied to clipboard
constructor(rsInterface: RSInterface)

Functions

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