project: Add a bit of backward compatibility to the reworked menus
This commit is contained in:
@@ -70,6 +70,12 @@ public class RuneLiteMenuEntry implements MenuEntry
|
||||
return MenuAction.of(opcode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuAction getMenuAction()
|
||||
{
|
||||
return this.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuEntry setType(MenuAction menuAction)
|
||||
{
|
||||
@@ -84,6 +90,31 @@ public class RuneLiteMenuEntry implements MenuEntry
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOpcode()
|
||||
{
|
||||
int opcode = Client.menuOpcodes[this.idx];
|
||||
if (opcode >= 2000)
|
||||
{
|
||||
opcode -= 2000;
|
||||
}
|
||||
|
||||
return opcode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOpcode(int code)
|
||||
{
|
||||
int opcode = Client.menuOpcodes[this.idx];
|
||||
short mod = 0;
|
||||
if (opcode >= 2000)
|
||||
{
|
||||
mod = 2000;
|
||||
}
|
||||
|
||||
Client.menuOpcodes[this.idx] = code + mod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIdentifier()
|
||||
{
|
||||
@@ -110,6 +141,18 @@ public class RuneLiteMenuEntry implements MenuEntry
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getActionParam0()
|
||||
{
|
||||
return this.getParam0();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActionParam0(int param0)
|
||||
{
|
||||
this.setParam0(param0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getParam1()
|
||||
{
|
||||
@@ -123,6 +166,18 @@ public class RuneLiteMenuEntry implements MenuEntry
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getActionParam1()
|
||||
{
|
||||
return this.getParam1();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActionParam1(int param1)
|
||||
{
|
||||
this.setParam1(param1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDeprioritized()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user