mixins: Force RUNELITE_OVERLAY menuops to not be left click

This is similar to how you cannot left click the remove placeholder button
This commit is contained in:
Max Weber
2019-01-26 07:45:01 -07:00
parent 29d938500e
commit 935ce60791

View File

@@ -1406,4 +1406,28 @@ public abstract class RSClientMixin implements RSClient
{
client.getCallbacks().post(new ClientTick());
}
@Copy("shouldLeftClickOpenMenu")
boolean rs$shouldLeftClickOpenMenu()
{
throw new RuntimeException();
}
@Replace("shouldLeftClickOpenMenu")
boolean rl$shouldLeftClickOpenMenu()
{
if (rs$shouldLeftClickOpenMenu())
{
return true;
}
int len = getMenuOptionCount();
if (len > 0)
{
int type = getMenuTypes()[len - 1];
return type == MenuAction.RUNELITE_OVERLAY.getId();
}
return false;
}
}