Package net.runelite.api
Interface Menu
-
public interface MenuThe client minimenu.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MenuEntrycreateMenuEntry(int idx)Create a new menu entryMenuEntry[]getMenuEntries()Gets the current mini menu entries.intgetMenuHeight()Get the menu height.intgetMenuWidth()Get the menu width.intgetMenuX()Get the menu x location.intgetMenuY()Get the menu y location.voidremoveMenuEntry(MenuEntry entry)Remove a menu entryvoidsetMenuEntries(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
MenuOpenedevent, 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
-
-