public class RS2Widget extends RS07Wrapper<org.osbot.rs07.accessor.XRS2Widget> implements Interactable
Modifier and Type | Field and Description |
---|---|
int |
cachedDisplayedTime |
Constructor and Description |
---|
RS2Widget(org.osbot.rs07.accessor.XRS2Widget instance,
int thirdLevelId)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getAbsX()
Gets the absolute x coordinate for this widget.
|
int |
getAbsY()
Gets the absolute y coordinate for this widget.
|
int |
getActionType()
Gets the action type of this widget.
|
int |
getAlpha()
Gets the alpha color of this widget.
|
java.awt.Rectangle |
getBounds()
Gets the rectangle of this widget.
|
RS2Widget |
getChildWidget(int childId)
Gets the given child widget of this widget.
|
RS2Widget[] |
getChildWidgets()
Gets this widget's children.
|
int[] |
getConditionCompareValue()
Gets the condition compare value of this widget.
|
int[] |
getConditionType()
Gets the condition type of this widget.
|
int |
getContentType()
Gets the content type of this widget.
|
int |
getDisabledMediaId()
Gets the disabled media sprite id for this widget.
|
MediaType |
getDisabledMediaType()
Gets the disabled media type.
|
int[][] |
getDynamicValueFormulas()
Gets the dynamic formula values of this widget.
|
int |
getEnabledMediaId()
Gets the enabled media sprite id for this widget.
|
MediaType |
getEnabledMediaType()
Gets the enabled media type.
|
int |
getHeight()
Gets the height for this widget.
|
boolean |
getHiddenUntilMouseOver()
Checks if this widget is hidden until hovered.
|
int |
getId()
Gets the id of the widget
|
java.lang.String[] |
getInteractActions()
Gets the interact actions for this widget.
|
int[] |
getInv()
Gets the item ids for this widget.
|
int[] |
getInvStackSizes()
Gets the amounts of the items for this widget.
|
int |
getItemAmount()
Returns the amount of the item on this widget.
|
int |
getItemId()
Returns the item id of the item on this widget.
|
Item[] |
getItems()
Gets the items of this interface.
|
java.lang.String |
getMessage()
Gets the text displayed on this widget.
|
java.awt.Point |
getPosition()
Gets the position of this widget.
|
java.awt.Point |
getPositionIgnoreIsHidden(boolean ignoreIsHidden)
Gets the position of this widget.
|
java.awt.Rectangle |
getRectangleIgnoreIsHidden(boolean ignoreIsHidden)
Gets the rectangle of this widget.
|
int |
getRootId()
Returns the root parent id (first level) of this widget.
|
int |
getScrollMax()
Gets the maximum amount of pixels the scroll bar of this widget can scroll.
|
int |
getScrollX()
Currently unused in OSRS.
|
int |
getScrollY()
Gets the scroll y position for this widget.
|
int |
getSecondLevelId()
Gets the second level id for this widget.
|
java.lang.String |
getSelectedActionName()
Gets the selected action name for this widget.
|
java.lang.String |
getSpellName()
Gets the spell name for this widget.
|
int |
getSpriteIndex1()
Gets the primary sprite index for this widget.
|
int |
getSpriteIndex2()
Gets the secondary sprite index for this widget.
|
int |
getTextColor()
Gets the text colour of the text displayed on this widget.
|
int |
getTextDrawingAreaIndex()
Gets the index of the text drawing area for this widget.
|
int |
getThirdLevelId()
Gets the third level id for this widget.
|
java.lang.String |
getToolTip()
Gets the tool tip message for this widget.
|
int |
getType()
Gets the type for this widget.
|
int |
getWidth()
Gets the width for this widget.
|
boolean |
hasAction(java.lang.String... actions)
Check if widget contains one or more of specified actions.
|
boolean |
hover()
Attempts to hover the mouse over the next click needed to interact with this
Interactable . |
boolean |
interact(boolean ignoreIsHidden,
java.lang.String... actions)
Deprecated.
|
boolean |
interact(java.lang.String... actions)
Executes an @link org.osbot.rs07.event.InteractionEvent which attempts to interact with
this
Interactable with the specified actions (if any). |
boolean |
isHidden()
Returns the isHidden field of this widget in the osrs client.
|
boolean |
isSecondLevel()
Determines if this widget is a second level widget.
|
boolean |
isThirdLevel()
Determines if this widget is a third level widget.
|
boolean |
isVisible()
Determines if this widget is drawn or not.
|
boolean |
isVisibleIgnoreHidden(boolean ignoreIsHidden)
Determines if this widget exists or not.
|
RS2Widget |
refresh()
Refreshes the information for this widget.
|
java.lang.String |
toString() |
getClient, getMethods
public RS2Widget(org.osbot.rs07.accessor.XRS2Widget instance, int thirdLevelId)
instance
- The XRS2Widget
instancethirdLevelId
- The third level widget idpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean isVisible()
public boolean isVisibleIgnoreHidden(boolean ignoreIsHidden)
ignoreIsHidden
- Set to true to ignore the isHidden() value of this widget.public boolean isHidden()
public boolean isSecondLevel()
public boolean isThirdLevel()
public MediaType getEnabledMediaType()
public MediaType getDisabledMediaType()
public int getType()
public int getId()
public int getRootId()
public int getSecondLevelId()
public int getThirdLevelId()
public RS2Widget refresh()
public java.awt.Rectangle getBounds()
public int getAbsX()
public int getAbsY()
public int getScrollX()
public int getScrollY()
public int getWidth()
public int getHeight()
public boolean getHiddenUntilMouseOver()
public int getActionType()
public int getContentType()
public int getAlpha()
public int[] getConditionType()
public int[] getConditionCompareValue()
public int[][] getDynamicValueFormulas()
public int getScrollMax()
public int[] getInv()
public int[] getInvStackSizes()
public java.lang.String[] getInteractActions()
public int getTextDrawingAreaIndex()
public java.lang.String getMessage()
public int getTextColor()
public int getSpriteIndex1()
public int getSpriteIndex2()
public java.lang.String getSelectedActionName()
public java.lang.String getSpellName()
public java.lang.String getToolTip()
public int getDisabledMediaId()
public int getEnabledMediaId()
public java.awt.Point getPosition()
public java.awt.Point getPositionIgnoreIsHidden(boolean ignoreIsHidden)
ignoreIsHidden
- Whether to ignore the isHidden() value of this widget for visibility.public java.awt.Rectangle getRectangleIgnoreIsHidden(boolean ignoreIsHidden)
ignoreIsHidden
- Whether to ignore the isHidden() value of this widget for visibility.public RS2Widget[] getChildWidgets()
public RS2Widget getChildWidget(int childId)
childId
- The id of the child widget.public Item[] getItems()
public boolean interact(java.lang.String... actions)
Interactable
with the specified actions (if any).interact
in interface Interactable
actions
- The actions to chose from the menu while hovering over this Interactable
.@Deprecated public boolean interact(boolean ignoreIsHidden, java.lang.String... actions)
interact(String...)
public boolean hasAction(java.lang.String... actions)
actions
- The actions you wish to check.public int getItemId()
public int getItemAmount()
public boolean hover()
Interactable
.
This method will never click the mouse, so it can be used to speed up scripts while they are idling.hover
in interface Interactable