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), 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 * Casting a spell / op target on a widget
@@ -256,10 +256,9 @@ public enum MenuAction
*/ */
CANCEL(1006), CANCEL(1006),
/** /**
* Menu action triggered by either examining item in bank, examining * Menu action for low priority child component actions.
* item in inventory while having bank open, or examining equipped item.
*/ */
EXAMINE_ITEM_BANK_EQ(1007), CC_OP_LOW_PRIORITY(1007),
/** /**
* Menu action injected by runelite for its menu items. * 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() if ((event.getWidgetId() == WidgetInfo.BANK_ITEM_CONTAINER.getId()
|| event.getWidgetId() == WidgetInfo.BANK_INVENTORY_ITEMS_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("withdraw-x")
|| event.getMenuOption().equalsIgnoreCase("deposit-x"))) || event.getMenuOption().equalsIgnoreCase("deposit-x")))
{ {

View File

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

View File

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

View File

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

View File

@@ -75,7 +75,7 @@ class MouseHighlightOverlay extends Overlay
String option = menuEntry.getOption(); String option = menuEntry.getOption();
int type = menuEntry.getType(); 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 // These are always right click only
return null; return null;