Package net.runelite.api
Interface Menu
-
public interface Menu
The client minimenu.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MenuEntry
createMenuEntry(int idx)
Create a new menu entryMenuEntry[]
getMenuEntries()
Gets the current mini menu entries.int
getMenuHeight()
Get the menu height.int
getMenuWidth()
Get the menu width.int
getMenuX()
Get the menu x location.int
getMenuY()
Get the menu y location.void
removeMenuEntry(MenuEntry entry)
Remove a menu entryvoid
setMenuEntries(MenuEntry[] entries)
Sets the array of menu entries.
-
-
-
Method Detail
-
createMenuEntry
MenuEntry createMenuEntry(int idx)
Create a new menu entry- Parameters:
idx
- the index to create the menu entry at. Accepts negative indexes eg. -1 inserts at the end.- Returns:
- the newly created menu entry
-
getMenuEntries
MenuEntry[] getMenuEntries()
Gets the current mini menu entries.- Returns:
- array of menu entries
-
setMenuEntries
void setMenuEntries(MenuEntry[] entries)
Sets the array of menu entries.This method should typically be used in the context of the
MenuOpened
event, since setting the menu entries will be overwritten the next frame- Parameters:
entries
- new array of open menu entries
-
removeMenuEntry
void removeMenuEntry(MenuEntry entry)
Remove a menu entry- Parameters:
entry
- the menu entry
-
getMenuX
int getMenuX()
Get the menu x location. Only valid if the menu is open.- Returns:
- the menu x location
-
getMenuY
int getMenuY()
Get the menu y location. Only valid if the menu is open.- Returns:
- the menu y location
-
getMenuWidth
int getMenuWidth()
Get the menu width. Only valid if the menu is open.- Returns:
- the menu width
-
getMenuHeight
int getMenuHeight()
Get the menu height. Only valid if the menu is open.- Returns:
- the menu height
-
-