api: develop

This commit is contained in:
therealunull
2020-12-13 18:41:14 -05:00
parent 06fd8e4802
commit 77ea6c6154
60 changed files with 7706 additions and 10 deletions

View File

@@ -48,7 +48,7 @@ public class MenuEntry implements Cloneable
/**
* An identifier value for the target of the action.
*/
private int type;
private int identifier;
/**
* The action the entry will trigger.
* {@link MenuAction}
@@ -74,7 +74,7 @@ public class MenuEntry implements Cloneable
{
this.option = option;
this.target = target;
this.type = type;
this.identifier = type;
this.opcode = opcode;
this.actionParam0 = actionParam0;
this.actionParam1 = actionParam1;
@@ -104,6 +104,16 @@ public class MenuEntry implements Cloneable
this.actionParam1 = i;
}
public void setType(int i)
{
this.opcode = i;
}
public int getType()
{
return this.opcode;
}
/**
* Get opcode, but as it's enum counterpart
*/

View File

@@ -88,10 +88,25 @@ public class MenuOptionClicked extends MenuEntry implements Event
{
setOption(e.getOption());
setTarget(e.getTarget());
setType(e.getType());
setIdentifier(e.getIdentifier());
setOpcode(e.getOpcode());
setActionParam0(e.getActionParam0());
setActionParam1(e.getActionParam1());
setForceLeftClick(e.isForceLeftClick());
}
public int getWidgetId()
{
return getActionParam1();
}
public String getMenuTarget()
{
return getTarget();
}
public String getMenuOption()
{
return getOption();
}
}