api: rename menuaction cc ops

This commit is contained in:
Adam
2020-01-14 12:51:46 -05:00
parent 83a1a9e778
commit 1257b327a3
6 changed files with 11 additions and 12 deletions

View File

@@ -226,9 +226,9 @@ public enum MenuAction
PLAYER_EIGTH_OPTION(51),
/**
* Default menu action for a widget.
* Menu action for normal priority child component actions.
*/
WIDGET_DEFAULT(57),
CC_OP(57),
/**
* Casting a spell / op target on a widget
@@ -256,10 +256,9 @@ public enum MenuAction
*/
CANCEL(1006),
/**
* Menu action triggered by either examining item in bank, examining
* item in inventory while having bank open, or examining equipped item.
* Menu action for low priority child component actions.
*/
EXAMINE_ITEM_BANK_EQ(1007),
CC_OP_LOW_PRIORITY(1007),
/**
* Menu action injected by runelite for its menu items.

View File

@@ -608,7 +608,7 @@ public class TabInterface
if ((event.getWidgetId() == WidgetInfo.BANK_ITEM_CONTAINER.getId()
|| event.getWidgetId() == WidgetInfo.BANK_INVENTORY_ITEMS_CONTAINER.getId())
&& event.getMenuAction() == MenuAction.EXAMINE_ITEM_BANK_EQ
&& event.getMenuAction() == MenuAction.CC_OP_LOW_PRIORITY
&& (event.getMenuOption().equalsIgnoreCase("withdraw-x")
|| event.getMenuOption().equalsIgnoreCase("deposit-x")))
{

View File

@@ -120,7 +120,7 @@ public class CameraPlugin extends Plugin implements KeyListener, MouseListener
@Subscribe
public void onMenuEntryAdded(MenuEntryAdded menuEntryAdded)
{
if (menuEntryAdded.getType() == MenuAction.WIDGET_DEFAULT.getId() && menuEntryAdded.getOption().equals(LOOK_NORTH) && config.compassLook())
if (menuEntryAdded.getType() == MenuAction.CC_OP.getId() && menuEntryAdded.getOption().equals(LOOK_NORTH) && config.compassLook())
{
MenuEntry[] menuEntries = client.getMenuEntries();
int len = menuEntries.length;
@@ -144,7 +144,7 @@ public class CameraPlugin extends Plugin implements KeyListener, MouseListener
m.setOption(option);
m.setTarget(lookNorth.getTarget());
m.setIdentifier(identifier);
m.setType(MenuAction.WIDGET_DEFAULT.getId());
m.setType(MenuAction.CC_OP.getId());
m.setParam0(lookNorth.getActionParam0());
m.setParam1(lookNorth.getActionParam1());
return m;
@@ -275,7 +275,7 @@ public class CameraPlugin extends Plugin implements KeyListener, MouseListener
case EXAMINE_NPC:
case EXAMINE_ITEM_GROUND:
case EXAMINE_ITEM:
case EXAMINE_ITEM_BANK_EQ:
case CC_OP_LOW_PRIORITY:
if (config.ignoreExamine())
{
break;

View File

@@ -130,7 +130,7 @@ public class ExaminePlugin extends Plugin
type = ExamineType.ITEM;
id = event.getId();
break;
case EXAMINE_ITEM_BANK_EQ:
case CC_OP_LOW_PRIORITY:
{
type = ExamineType.ITEM_BANK_EQ;
int[] qi = findItemFromWidget(event.getWidgetId(), event.getActionParam());

View File

@@ -100,7 +100,7 @@ class ItemPricesOverlay extends Overlay
{
break;
}
case WIDGET_DEFAULT:
case CC_OP:
case ITEM_USE:
case ITEM_FIRST_OPTION:
case ITEM_SECOND_OPTION:

View File

@@ -75,7 +75,7 @@ class MouseHighlightOverlay extends Overlay
String option = menuEntry.getOption();
int type = menuEntry.getType();
if (type == MenuAction.RUNELITE_OVERLAY.getId() || type == MenuAction.EXAMINE_ITEM_BANK_EQ.getId())
if (type == MenuAction.RUNELITE_OVERLAY.getId() || type == MenuAction.CC_OP_LOW_PRIORITY.getId())
{
// These are always right click only
return null;