client: merge upstream

This commit is contained in:
zeruth
2020-05-28 02:47:16 -04:00
parent 3c2f26b523
commit a7eb45b3e3
3 changed files with 10 additions and 5 deletions

View File

@@ -2030,7 +2030,7 @@ public interface Client extends GameShell
* If the image is larger than half the width of fixed mode, * If the image is larger than half the width of fixed mode,
* it won't get mirrored to the other side of the screen * it won't get mirrored to the other side of the screen
*/ */
void setLoginScreen(SpritePixels pixels); void setLoginScreen(Sprite pixels);
/** /**
* Sets whether the flames on the login screen should be rendered * Sets whether the flames on the login screen should be rendered

View File

@@ -279,6 +279,11 @@ public enum MenuOpcode
* Menu action for configuring runelite overlays. * Menu action for configuring runelite overlays.
*/ */
RUNELITE_OVERLAY_CONFIG(1502), RUNELITE_OVERLAY_CONFIG(1502),
/**
* Menu action injected by runelite for menu items which target
* a player and have its identifier set to a player index.
*/
RUNELITE_PLAYER(1503),
FOLLOW(2046), FOLLOW(2046),
TRADE(2047), TRADE(2047),

View File

@@ -448,8 +448,8 @@ public class MenuManager
} }
} }
if (event.getMenuAction() != MenuAction.RUNELITE if (event.getMenuOpcode() != MenuOpcode.RUNELITE
&& event.getMenuAction() != MenuAction.RUNELITE_PLAYER) && event.getMenuOpcode() != MenuOpcode.RUNELITE_PLAYER)
{ {
return; // not a managed widget option or custom player option return; // not a managed widget option or custom player option
} }
@@ -460,7 +460,7 @@ public class MenuManager
for (WidgetMenuOption curMenuOption : options) for (WidgetMenuOption curMenuOption : options)
{ {
if (curMenuOption.getMenuTarget().equals(event.getTarget()) if (curMenuOption.getMenuTarget().equals(event.getTarget())
&& curMenuOption.getMenuOption().equals(event.getOption())) && curMenuOption.getMenuOption().equals(event.getMenuOpcode()))
{ {
WidgetMenuOptionClicked customMenu = new WidgetMenuOptionClicked(); WidgetMenuOptionClicked customMenu = new WidgetMenuOptionClicked();
customMenu.setMenuOption(event.getOption()); customMenu.setMenuOption(event.getOption());
@@ -484,7 +484,7 @@ public class MenuManager
{ {
client.getPlayerOptions()[playerOptionIndex] = menuText; client.getPlayerOptions()[playerOptionIndex] = menuText;
client.getPlayerOptionsPriorities()[playerOptionIndex] = true; client.getPlayerOptionsPriorities()[playerOptionIndex] = true;
client.getPlayerMenuTypes()[playerOptionIndex] = MenuAction.RUNELITE_PLAYER.getId(); client.getPlayerMenuTypes()[playerOptionIndex] = MenuOpcode.RUNELITE_PLAYER.getId();
playerMenuIndexMap.put(playerOptionIndex, menuText); playerMenuIndexMap.put(playerOptionIndex, menuText);
} }