Add rank icons back to menu entries
Signed-off-by: PKLite <stonewall@pklite.xyz> (cherry picked from commit f42fbd5624f14169309541f520e00dbe747395a2)
This commit is contained in:
@@ -134,7 +134,7 @@ public class PlayerIndicatorsOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
OverlayUtil.renderActorTextAndImage(graphics, actor, builtString, color,
|
OverlayUtil.renderActorTextAndImage(graphics, actor, builtString, color,
|
||||||
ImageUtil.resizeImage(Objects.requireNonNull(clanManager.getClanImage(clanManager.getRank(actor.getName()))), y, y)
|
ImageUtil.resizeImage(Objects.requireNonNull(clanManager.getClanImage(clanManager.getRank(actor.getName()))), y, y)
|
||||||
,x + ACTOR_HORIZONTAL_TEXT_MARGIN, 0);
|
,0,ACTOR_HORIZONTAL_TEXT_MARGIN);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ import net.runelite.client.plugins.PluginDescriptor;
|
|||||||
import net.runelite.client.plugins.PluginType;
|
import net.runelite.client.plugins.PluginType;
|
||||||
import net.runelite.client.ui.overlay.OverlayManager;
|
import net.runelite.client.ui.overlay.OverlayManager;
|
||||||
import net.runelite.client.util.ColorUtil;
|
import net.runelite.client.util.ColorUtil;
|
||||||
|
import net.runelite.client.util.ImageUtil;
|
||||||
import net.runelite.client.util.PvPUtil;
|
import net.runelite.client.util.PvPUtil;
|
||||||
import net.runelite.http.api.hiscore.HiscoreClient;
|
import net.runelite.http.api.hiscore.HiscoreClient;
|
||||||
import net.runelite.http.api.hiscore.HiscoreResult;
|
import net.runelite.http.api.hiscore.HiscoreResult;
|
||||||
@@ -307,7 +308,6 @@ public class PlayerIndicatorsPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
image = clanManager.getIconNumber(rank);
|
image = clanManager.getIconNumber(rank);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (this.highlightTeam && player.getTeam() > 0 && (localPlayer != null ? localPlayer.getTeam() : -1) == player.getTeam())
|
else if (this.highlightTeam && player.getTeam() > 0 && (localPlayer != null ? localPlayer.getTeam() : -1) == player.getTeam())
|
||||||
{
|
{
|
||||||
if (Arrays.asList(this.locationHashMap.get(PlayerRelation.TEAM)).contains(PlayerIndicationLocation.MENU))
|
if (Arrays.asList(this.locationHashMap.get(PlayerRelation.TEAM)).contains(PlayerIndicationLocation.MENU))
|
||||||
@@ -368,6 +368,10 @@ public class PlayerIndicatorsPlugin extends Plugin
|
|||||||
|
|
||||||
lastEntry.setTarget(ColorUtil.prependColorTag(target, color));
|
lastEntry.setTarget(ColorUtil.prependColorTag(target, color));
|
||||||
}
|
}
|
||||||
|
if (image != -1)
|
||||||
|
{
|
||||||
|
lastEntry.setTarget("<img=" + image + ">" + lastEntry.getTarget());
|
||||||
|
}
|
||||||
|
|
||||||
if (image2 != -1 && this.playerSkull)
|
if (image2 != -1 && this.playerSkull)
|
||||||
{
|
{
|
||||||
@@ -378,6 +382,7 @@ public class PlayerIndicatorsPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void getCallerList()
|
private void getCallerList()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ import javax.inject.Inject;
|
|||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import net.runelite.api.Actor;
|
import net.runelite.api.Actor;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.Friend;
|
|
||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
import net.runelite.client.util.PvPUtil;
|
import net.runelite.client.util.PvPUtil;
|
||||||
|
|
||||||
@@ -95,42 +94,35 @@ public class PlayerIndicatorsService
|
|||||||
{
|
{
|
||||||
consumer.accept(p, PlayerRelation.FRIEND);
|
consumer.accept(p, PlayerRelation.FRIEND);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (clan.test(p) && plugin.getLocationHashMap().containsKey(PlayerRelation.CLAN))
|
if (clan.test(p) && plugin.getLocationHashMap().containsKey(PlayerRelation.CLAN))
|
||||||
{
|
{
|
||||||
consumer.accept(p, PlayerRelation.CLAN);
|
consumer.accept(p, PlayerRelation.CLAN);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (team.test(p) && plugin.getLocationHashMap().containsKey(PlayerRelation.TEAM))
|
if (team.test(p) && plugin.getLocationHashMap().containsKey(PlayerRelation.TEAM))
|
||||||
{
|
{
|
||||||
consumer.accept(p, PlayerRelation.TEAM);
|
consumer.accept(p, PlayerRelation.TEAM);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (target.test(p) && plugin.getLocationHashMap().containsKey(PlayerRelation.TARGET))
|
if (target.test(p) && plugin.getLocationHashMap().containsKey(PlayerRelation.TARGET))
|
||||||
{
|
{
|
||||||
consumer.accept(p, PlayerRelation.TARGET);
|
consumer.accept(p, PlayerRelation.TARGET);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (caller.test(p) && plugin.getLocationHashMap().containsKey(PlayerRelation.CALLER))
|
if (caller.test(p) && plugin.getLocationHashMap().containsKey(PlayerRelation.CALLER))
|
||||||
{
|
{
|
||||||
consumer.accept(p, PlayerRelation.CALLER);
|
consumer.accept(p, PlayerRelation.CALLER);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (callerTarget.test(p) && plugin.getLocationHashMap().containsKey(PlayerRelation.CALLER_TARGET))
|
if (callerTarget.test(p) && plugin.getLocationHashMap().containsKey(PlayerRelation.CALLER_TARGET))
|
||||||
{
|
{
|
||||||
consumer.accept(p, PlayerRelation.CALLER_TARGET);
|
consumer.accept(p, PlayerRelation.CALLER_TARGET);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (other.test(p) && plugin.getLocationHashMap().containsKey(PlayerRelation.OTHER))
|
if (other.test(p) && plugin.getLocationHashMap().containsKey(PlayerRelation.OTHER))
|
||||||
{
|
{
|
||||||
consumer.accept(p, PlayerRelation.OTHER);
|
consumer.accept(p, PlayerRelation.OTHER);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user