project(events): Add back some MOC methods
This commit is contained in:
@@ -122,4 +122,22 @@ public interface MenuEntry
|
||||
*/
|
||||
@Nullable
|
||||
Widget getWidget();
|
||||
|
||||
@Deprecated
|
||||
int getOpcode();
|
||||
@Deprecated
|
||||
void setOpcode(int opcode);
|
||||
|
||||
@Deprecated
|
||||
int getActionParam0();
|
||||
@Deprecated
|
||||
void setActionParam0(int param0);
|
||||
|
||||
@Deprecated
|
||||
int getActionParam1();
|
||||
@Deprecated
|
||||
void setActionParam1(int param0);
|
||||
|
||||
@Deprecated
|
||||
MenuAction getMenuAction();
|
||||
}
|
||||
@@ -26,6 +26,7 @@ package net.runelite.api.events;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import net.runelite.api.MenuAction;
|
||||
import net.runelite.api.MenuEntry;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
@@ -52,6 +53,7 @@ public class MenuOptionClicked
|
||||
* Whether or not the event has been consumed by a subscriber.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean consumed;
|
||||
|
||||
/**
|
||||
@@ -62,6 +64,11 @@ public class MenuOptionClicked
|
||||
return menuEntry.getParam0();
|
||||
}
|
||||
|
||||
public void setParam0(int param0)
|
||||
{
|
||||
menuEntry.setParam0(param0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Action parameter 1. Its value depends on the menuAction.
|
||||
*/
|
||||
@@ -70,6 +77,11 @@ public class MenuOptionClicked
|
||||
return menuEntry.getParam1();
|
||||
}
|
||||
|
||||
public void setParam1(int param1)
|
||||
{
|
||||
menuEntry.setParam1(param1);
|
||||
}
|
||||
|
||||
/**
|
||||
* The option text added to the menu.
|
||||
*/
|
||||
@@ -78,6 +90,11 @@ public class MenuOptionClicked
|
||||
return menuEntry.getOption();
|
||||
}
|
||||
|
||||
public void setMenuOption(String menuOption)
|
||||
{
|
||||
menuEntry.setOption(menuOption);
|
||||
}
|
||||
|
||||
/**
|
||||
* The target of the action.
|
||||
*/
|
||||
@@ -86,6 +103,11 @@ public class MenuOptionClicked
|
||||
return menuEntry.getTarget();
|
||||
}
|
||||
|
||||
public void setMenuTarget(String menuTarget)
|
||||
{
|
||||
menuEntry.setOption(menuTarget);
|
||||
}
|
||||
|
||||
/**
|
||||
* The action performed.
|
||||
*/
|
||||
@@ -94,6 +116,11 @@ public class MenuOptionClicked
|
||||
return menuEntry.getType();
|
||||
}
|
||||
|
||||
public void setMenuAction(MenuAction menuAction)
|
||||
{
|
||||
menuEntry.setType(menuAction);
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the object, actor, or item that the interaction targets.
|
||||
*/
|
||||
@@ -102,6 +129,11 @@ public class MenuOptionClicked
|
||||
return menuEntry.getIdentifier();
|
||||
}
|
||||
|
||||
public void setId(int id)
|
||||
{
|
||||
menuEntry.setIdentifier(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if this menu entry is an item op. "Use" and "Examine" are not considered item ops.
|
||||
* @return
|
||||
@@ -159,9 +191,33 @@ public class MenuOptionClicked
|
||||
return menuEntry.getParam0();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setActionParam(int actionParam)
|
||||
{
|
||||
menuEntry.setParam0(actionParam);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getWidgetId()
|
||||
{
|
||||
return menuEntry.getParam1();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setWidgetId(int widgetId)
|
||||
{
|
||||
menuEntry.setParam1(widgetId);
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public void setMenuEntry(MenuEntry entry)
|
||||
{
|
||||
this.setMenuOption(entry.getOption());
|
||||
this.setMenuTarget(entry.getTarget());
|
||||
this.setId(entry.getIdentifier());
|
||||
this.setMenuAction(entry.getType());
|
||||
this.setParam0(entry.getParam0());
|
||||
this.setParam1(entry.getParam1());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user