mixins: Don't clobber left click forced menuops
This commit is contained in:
@@ -59,5 +59,11 @@ public class MenuEntry
|
||||
* A second additional parameter for the action.
|
||||
*/
|
||||
private int param1;
|
||||
|
||||
/**
|
||||
* If this field is true and you have single mouse button on and this entry is
|
||||
* the top entry the right click menu will not be opened when you left click
|
||||
*
|
||||
* This is used for shift click
|
||||
*/
|
||||
private boolean forceLeftClick;
|
||||
}
|
||||
|
||||
@@ -546,6 +546,7 @@ public abstract class RSClientMixin implements RSClient
|
||||
int[] menuTypes = getMenuTypes();
|
||||
int[] params0 = getMenuActionParams0();
|
||||
int[] params1 = getMenuActionParams1();
|
||||
boolean[] leftClick = getMenuForceLeftClick();
|
||||
|
||||
MenuEntry[] entries = new MenuEntry[count];
|
||||
for (int i = 0; i < count; ++i)
|
||||
@@ -557,6 +558,7 @@ public abstract class RSClientMixin implements RSClient
|
||||
entry.setType(menuTypes[i]);
|
||||
entry.setParam0(params0[i]);
|
||||
entry.setParam1(params1[i]);
|
||||
entry.setForceLeftClick(leftClick[i]);
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
@@ -572,6 +574,7 @@ public abstract class RSClientMixin implements RSClient
|
||||
int[] menuTypes = getMenuTypes();
|
||||
int[] params0 = getMenuActionParams0();
|
||||
int[] params1 = getMenuActionParams1();
|
||||
boolean[] leftClick = getMenuForceLeftClick();
|
||||
|
||||
for (MenuEntry entry : entries)
|
||||
{
|
||||
@@ -581,6 +584,7 @@ public abstract class RSClientMixin implements RSClient
|
||||
menuTypes[count] = entry.getType();
|
||||
params0[count] = entry.getParam0();
|
||||
params1[count] = entry.getParam1();
|
||||
leftClick[count] = entry.isForceLeftClick();
|
||||
++count;
|
||||
}
|
||||
|
||||
|
||||
@@ -307,6 +307,9 @@ public interface RSClient extends RSGameEngine, Client
|
||||
@Import("menuActionParams1")
|
||||
int[] getMenuActionParams1();
|
||||
|
||||
@Import("menuForceLeftClick")
|
||||
boolean[] getMenuForceLeftClick();
|
||||
|
||||
@Import("worldList")
|
||||
@Override
|
||||
RSWorld[] getWorldList();
|
||||
|
||||
Reference in New Issue
Block a user