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 boolean
clickAction(java.lang.String action)
Clicks the menu action given.boolean
clickAction(java.lang.String action, java.lang.String name)
Click action.boolean
clickAction(java.lang.String action, java.lang.String name, int id)
Click action.boolean
clickAction(java.lang.String action, Entity entity)
Click action.boolean
clickIndex(int index)
Click index.boolean
close()
Removes the current menu from the game interface.boolean
contains(java.lang.String action)
Determines if menu contains action (NOT THE ENTITY/OBJECT NAME) in one of the menu rows.boolean
contains(java.lang.String action, Entity entity)
Determines if menu contains action (NOT THE ENTITY/OBJECT NAME) in one of the menu rows.boolean
containsEntity(Entity entity)
boolean
containsObject(java.lang.String name)
Determines if menu contains object name (NOT THE ACTION) in one of the menu rows.java.awt.Rectangle
getBounds()
Gets bounds.int
getCount()
java.lang.String
getDefaultAction()
Gets default action.MenuRow
getFirstMenuRow()
int
getHeight()
int
getIndex(java.lang.String action)
Gets the index of offset menu item in the list of menu itemsint
getIndex(java.lang.String action, java.lang.String object)
Gets index.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.int
getIndex(java.lang.String action, Entity entity)
Gets index.java.awt.Rectangle
getIndexRectangle(int index)
Gets index rectangle.int
getLastHovered()
java.util.List<MenuRow>
getMenuRows()
Gets each row of the menu as a MenuRow objectGameMenu
getMenuWithAction(java.lang.String action)
java.lang.String[]
getOptions()
int
getSubIndex()
java.util.List<GameMenu>
getSubMenu()
int
getWidth()
int
getX()
int
getY()
boolean
hover(int index)
boolean
isMouseOnAction(int index)
Is mouse on action.boolean
isMouseOnAction(java.lang.String action)
Is mouse on action.boolean
isVisible()
boolean
mouseOverAction(int index)
Mouse over action.boolean
mouseOverAction(java.lang.String action)
Mouse over action.boolean
open()
-
-
-
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()
-
-