Search in sources :

Example 6 with MenuCommand

use of org.powerbot.script.MenuCommand in project powerbot by powerbot.

the class Menu method items.

/**
 * Returns an array of all the current menu items ([action_1 option_1, action_2 option_2, ...]).
 *
 * @return the array of menu items
 */
public String[] items() {
    final MenuCommand[] m = commands();
    final int len = m.length;
    final String[] arr = new String[len];
    for (int i = 0; i < len; i++) {
        arr[i] = m[i].action + " " + m[i].option;
        arr[i] = arr[i].trim();
    }
    return arr;
}
Also used : Point(java.awt.Point) MenuCommand(org.powerbot.script.MenuCommand)

Aggregations

Point (java.awt.Point)6 MenuCommand (org.powerbot.script.MenuCommand)6 MenuItemNode (org.powerbot.bot.rt6.client.MenuItemNode)1