Class GameMenu
- java.lang.Object
-
- org.dreambot.api.wrappers.widgets.GameMenu
-
public class GameMenu extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description GameMenu(org.dreambot.internal.injector.interfaces.RSMenu reference, int subIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanclickAction(java.lang.String action)Clicks the menu action given.booleanclickAction(java.lang.String action, java.lang.String name)Click action.booleanclickAction(java.lang.String action, java.lang.String name, int id)Click action.booleanclickAction(java.lang.String action, Entity entity)Click action.booleanclickIndex(int index)Click index.booleanclose()Removes the current menu from the game interface.booleancontains(java.lang.String action)Determines if menu contains action (NOT THE ENTITY/OBJECT NAME) in one of the menu rows.booleancontains(java.lang.String action, Entity entity)Determines if menu contains action (NOT THE ENTITY/OBJECT NAME) in one of the menu rows.booleancontainsEntity(Entity entity)booleancontainsObject(java.lang.String name)Determines if menu contains object name (NOT THE ACTION) in one of the menu rows.java.awt.RectanglegetBounds()Gets bounds.intgetCount()java.lang.StringgetDefaultAction()Gets default action.MenuRowgetFirstMenuRow()intgetHeight()intgetIndex(java.lang.String action)Gets the index of offset menu item in the list of menu itemsintgetIndex(java.lang.String action, java.lang.String object)Gets index.intgetIndex(java.lang.String action, java.lang.String object, int id)Gets the index of offset menu item in the list of menu items using the given action, object, and entity index if provided.intgetIndex(java.lang.String action, Entity entity)Gets index.java.awt.RectanglegetIndexRectangle(int index)Gets index rectangle.intgetLastHovered()java.util.List<MenuRow>getMenuRows()Gets each row of the menu as a MenuRow objectGameMenugetMenuWithAction(java.lang.String action)java.lang.String[]getOptions()intgetSubIndex()java.util.List<GameMenu>getSubMenu()intgetWidth()intgetX()intgetY()booleanhover(int index)booleanisMouseOnAction(int index)Is mouse on action.booleanisMouseOnAction(java.lang.String action)Is mouse on action.booleanisVisible()booleanmouseOverAction(int index)Mouse over action.booleanmouseOverAction(java.lang.String action)Mouse over action.booleanopen()
-
-
-
Method Detail
-
containsEntity
public boolean containsEntity(Entity entity)
-
getLastHovered
public int getLastHovered()
-
isVisible
public boolean isVisible()
-
getHeight
public int getHeight()
-
getWidth
public int getWidth()
-
getY
public int getY()
-
getX
public int getX()
-
getCount
public int getCount()
-
getOptions
public java.lang.String[] getOptions()
-
getSubMenu
public java.util.List<GameMenu> getSubMenu()
-
getMenuWithAction
public GameMenu getMenuWithAction(java.lang.String action)
-
getFirstMenuRow
public MenuRow getFirstMenuRow()
-
getMenuRows
public java.util.List<MenuRow> getMenuRows()
Gets each row of the menu as a MenuRow object- Returns:
- List of MenuRow
-
getBounds
public java.awt.Rectangle getBounds()
Gets bounds.- Returns:
- the bounds
-
getDefaultAction
public java.lang.String getDefaultAction()
Gets default action.- Returns:
- the default action
-
getIndex
public int getIndex(java.lang.String action)
Gets the index of offset menu item in the list of menu items- Parameters:
action- The action to look for- Returns:
- The index of the item if it was found, otherwise -1.
-
getIndex
public int getIndex(java.lang.String action, Entity entity)Gets index.- Parameters:
action- the actionentity- the entity- Returns:
- the index
-
getIndex
public int getIndex(java.lang.String action, java.lang.String object)Gets index.- Parameters:
action- the actionobject- the object- Returns:
- the index
-
getIndex
public int getIndex(java.lang.String action, java.lang.String object, int id)Gets the index of offset menu item in the list of menu items using the given action, object, and entity index if provided.- Parameters:
action- the action to get the index forobject- the object to get the index forid- the entity id to get exact index, use -1 to ignore- Returns:
- The index of the item if it was found, otherwise -1.
-
clickAction
public boolean clickAction(java.lang.String action)
Clicks the menu action given.- Parameters:
action- The action to click, using best option.- Returns:
- the boolean
-
clickAction
public boolean clickAction(java.lang.String action, java.lang.String name)Click action.- Parameters:
action- the actionname- the name- Returns:
- the boolean
-
clickAction
public boolean clickAction(java.lang.String action, Entity entity)Click action.- Parameters:
action- the actionentity- the entity- Returns:
- the boolean
-
clickAction
public boolean clickAction(java.lang.String action, java.lang.String name, int id)Click action.- Parameters:
action- the actionname- the name of the objectid- the entity index- Returns:
- the boolean
-
clickIndex
public boolean clickIndex(int index)
Click index.- Parameters:
index- the index- Returns:
- the boolean
-
open
public boolean open()
-
getIndexRectangle
public java.awt.Rectangle getIndexRectangle(int index)
Gets index rectangle.- Parameters:
index- the index- Returns:
- the index rectangle
-
mouseOverAction
public boolean mouseOverAction(java.lang.String action)
Mouse over action.- Parameters:
action- the action- Returns:
- the boolean
-
mouseOverAction
public boolean mouseOverAction(int index)
Mouse over action.- Parameters:
index- the index- Returns:
- the boolean
-
isMouseOnAction
public boolean isMouseOnAction(java.lang.String action)
Is mouse on action.- Parameters:
action- the action- Returns:
- the boolean
-
isMouseOnAction
public boolean isMouseOnAction(int index)
Is mouse on action.- Parameters:
index- the index- Returns:
- the boolean
-
close
public boolean close()
Removes the current menu from the game interface.- Returns:
- the boolean
-
containsObject
public boolean containsObject(java.lang.String name)
Determines if menu contains object name (NOT THE ACTION) in one of the menu rows.- Parameters:
name- the name of the entity/object to check- Returns:
- true if menu contains name, otherwise false
-
contains
public boolean contains(java.lang.String action)
Determines if menu contains action (NOT THE ENTITY/OBJECT NAME) in one of the menu rows.- Parameters:
action- the action to check- Returns:
- true if menu contains action, otherwise false
-
contains
public boolean contains(java.lang.String action, Entity entity)Determines if menu contains action (NOT THE ENTITY/OBJECT NAME) in one of the menu rows.- Parameters:
action- the action to checkentity- the to filter search- Returns:
- true if menu contains action, otherwise false
-
hover
public boolean hover(int index)
-
getSubIndex
public int getSubIndex()
-
-