Merge remote-tracking branch 'runelite/master'

This commit is contained in:
Owain van Brakel
2022-05-24 23:21:55 +02:00
22 changed files with 123 additions and 97 deletions

View File

@@ -123,6 +123,27 @@ public interface MenuEntry
@Nullable
Widget getWidget();
/**
* Get the {@link NPC} this menu entry is targeting, if any.
* @return
*/
@Nullable
NPC getNpc();
/**
* Get the {@link Player} this menu entry is targeting, if any.
* @return
*/
@Nullable
Player getPlayer();
/**
* Get the {@link Actor} this menu entry is targeting, if any.
* @return
*/
@Nullable
Actor getActor();
@Deprecated
int getOpcode();
@Deprecated
@@ -140,4 +161,4 @@ public interface MenuEntry
@Deprecated
MenuAction getMenuAction();
}
}

View File

@@ -183,6 +183,14 @@ public interface Widget
@Deprecated
void setRelativeY(int y);
/**
* Set a forced position for the widget. This position overrides the relative x/y for the
* widget, even if the widget is revalidated. To clear the forced position pass -1 for x/y.
* @param x x pos relative to the parent
* @param y y pos relative to the parent
*/
void setForcedPosition(int x, int y);
/**
* Gets the text displayed on this widget.
*