add option to overlay non-clanmate player names
This commit is contained in:
@@ -65,6 +65,16 @@ public interface PlayerIndicatorsConfig extends Config
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "drawNonClanMemberNames",
|
||||||
|
name = "Draw non-clan member names",
|
||||||
|
description = "Configures whether or not names of non-clan members should be drawn"
|
||||||
|
)
|
||||||
|
default boolean drawNonClanMemberNames()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "drawPlayerTiles",
|
keyName = "drawPlayerTiles",
|
||||||
name = "Draw tiles",
|
name = "Draw tiles",
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ public class PlayerIndicatorsOverlay extends Overlay
|
|||||||
private static final Color CYAN = new Color(0, 184, 212);
|
private static final Color CYAN = new Color(0, 184, 212);
|
||||||
private static final Color GREEN = new Color(0, 200, 83);
|
private static final Color GREEN = new Color(0, 200, 83);
|
||||||
private static final Color PURPLE = new Color(170, 0, 255);
|
private static final Color PURPLE = new Color(170, 0, 255);
|
||||||
|
private static final Color RED = new Color(255, 0, 0);
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final PlayerIndicatorsConfig config;
|
private final PlayerIndicatorsConfig config;
|
||||||
|
|
||||||
@@ -57,7 +59,8 @@ public class PlayerIndicatorsOverlay extends Overlay
|
|||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics, Point parent)
|
public Dimension render(Graphics2D graphics, Point parent)
|
||||||
{
|
{
|
||||||
if (!config.drawOwnName() && !config.drawClanMemberNames() && !config.drawFriendNames())
|
if (!config.drawOwnName() && !config.drawClanMemberNames() &&
|
||||||
|
!config.drawFriendNames() && !config.drawNonClanMemberNames())
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -86,6 +89,10 @@ public class PlayerIndicatorsOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
renderPlayerOverlay(graphics, player, PURPLE);
|
renderPlayerOverlay(graphics, player, PURPLE);
|
||||||
}
|
}
|
||||||
|
else if (config.drawNonClanMemberNames() && !client.isClanMember(name))
|
||||||
|
{
|
||||||
|
renderPlayerOverlay(graphics, player, RED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user