project: Add a bit of backward compatibility to the reworked menus
This commit is contained in:
@@ -92,4 +92,22 @@ public interface MenuEntry
|
||||
* @return
|
||||
*/
|
||||
MenuEntry onClick(Consumer<MenuEntry> callback);
|
||||
|
||||
@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.Setter;
|
||||
import net.runelite.api.MenuAction;
|
||||
|
||||
/**
|
||||
* An event when a new entry is added to a right-click menu.
|
||||
@@ -92,4 +93,45 @@ public class MenuEntryAdded
|
||||
{
|
||||
this.modified = true;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getParam0()
|
||||
{
|
||||
return actionParam0;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setParam0(int param)
|
||||
{
|
||||
actionParam0 = param;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getParam1()
|
||||
{
|
||||
return actionParam1;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setParam1(int param)
|
||||
{
|
||||
actionParam1 = param;
|
||||
}
|
||||
@Deprecated
|
||||
public int getOpcode()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setOpcode(int opcode)
|
||||
{
|
||||
type = opcode;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public MenuAction getMenuAction()
|
||||
{
|
||||
return MenuAction.of(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,4 +96,28 @@ public class MenuOptionClicked
|
||||
this.setParam0(entry.getParam0());
|
||||
this.setParam1(entry.getParam1());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getActionParam()
|
||||
{
|
||||
return param0;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setActionParam(int i)
|
||||
{
|
||||
param0 = i;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getWidgetId()
|
||||
{
|
||||
return param1;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setWidgetId(int i)
|
||||
{
|
||||
param1 = i;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user