api: add item op menu api
This commit is contained in:
@@ -95,6 +95,26 @@ public interface MenuEntry
|
|||||||
*/
|
*/
|
||||||
MenuEntry onClick(Consumer<MenuEntry> callback);
|
MenuEntry onClick(Consumer<MenuEntry> callback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test if this menu entry is an item op. "Use" and "Examine" are not considered item ops.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean isItemOp();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this menu entry is an item op, get the item op id
|
||||||
|
* @return 1-5
|
||||||
|
*/
|
||||||
|
int getItemOp();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this menu entry is an item op, get the item id
|
||||||
|
* @return
|
||||||
|
* @see ItemID
|
||||||
|
* @see NullItemID
|
||||||
|
*/
|
||||||
|
int getItemId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the widget this menu entry is on, if this is a menu entry
|
* Get the widget this menu entry is on, if this is a menu entry
|
||||||
* with an associated widget. Such as eg, CC_OP.
|
* with an associated widget. Such as eg, CC_OP.
|
||||||
|
|||||||
@@ -102,6 +102,35 @@ public class MenuOptionClicked
|
|||||||
return menuEntry.getIdentifier();
|
return menuEntry.getIdentifier();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test if this menu entry is an item op. "Use" and "Examine" are not considered item ops.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean isItemOp()
|
||||||
|
{
|
||||||
|
return menuEntry.isItemOp();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this menu entry is an item op, get the item op id
|
||||||
|
* @return 1-5
|
||||||
|
*/
|
||||||
|
public int getItemOp()
|
||||||
|
{
|
||||||
|
return menuEntry.getItemOp();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this menu entry is an item op, get the item id
|
||||||
|
* @return
|
||||||
|
* @see net.runelite.api.ItemID
|
||||||
|
* @see net.runelite.api.NullItemID
|
||||||
|
*/
|
||||||
|
public int getItemId()
|
||||||
|
{
|
||||||
|
return menuEntry.getItemId();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the widget this menu entry is on, if this is a menu entry
|
* Get the widget this menu entry is on, if this is a menu entry
|
||||||
* with an associated widget. Such as eg, CC_OP.
|
* with an associated widget. Such as eg, CC_OP.
|
||||||
|
|||||||
Reference in New Issue
Block a user