api: develop
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user