Class MenuRequest


  • public final class MenuRequest
    extends java.lang.Object
    One interaction, described independently of how it will be delivered.

    This is the unit both input backends consume. It carries everything the native menu pipeline needs plus an optional canvas point. A point of (-1, -1) means "no preference": the packet backend requires that, and the cursor backend derives its own aim point from the target instead.

    • Method Detail

      • of

        public static MenuRequest of​(net.runelite.api.MenuAction action,
                                     int identifier,
                                     int param0,
                                     int param1,
                                     java.lang.String option,
                                     java.lang.String target,
                                     int itemId,
                                     int worldViewId)
      • of

        public static MenuRequest of​(net.runelite.api.MenuAction action,
                                     int identifier,
                                     int param0,
                                     int param1,
                                     java.lang.String option,
                                     java.lang.String target,
                                     int itemId,
                                     int worldViewId,
                                     int canvasX,
                                     int canvasY)
      • withPoint

        public MenuRequest withPoint​(int x,
                                     int y)
      • getAction

        public net.runelite.api.MenuAction getAction()
      • getIdentifier

        public int getIdentifier()
      • getParam0

        public int getParam0()
      • getParam1

        public int getParam1()
      • getOption

        public java.lang.String getOption()
      • getTarget

        public java.lang.String getTarget()
      • getItemId

        public int getItemId()
      • getWorldViewId

        public int getWorldViewId()
      • getCanvasX

        public int getCanvasX()
      • getCanvasY

        public int getCanvasY()
      • hasPoint

        public boolean hasPoint()
      • expectedOption

        public java.lang.String expectedOption()
        The menu option this request expects to activate, used to confirm that what sits under the cursor is what the caller asked for before clicking.
      • expectedTarget

        public java.lang.String expectedTarget()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object