Skip to content

Commit

Permalink
Merge pull request runelite#2012 from oplosthee/playerindicator-toggle
Browse files Browse the repository at this point in the history
Add toggle for drawing overhead player names to PlayerIndicators plugin
  • Loading branch information
Adam- authored Apr 27, 2018
2 parents 1b414bd + cad63c7 commit 633c390
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,17 @@ default boolean drawTiles()

@ConfigItem(
position = 11,
keyName = "drawOverheadPlayerNames",
name = "Draw names above players",
description = "Configures whether or not player names should be drawn above players"
)
default boolean drawOverheadPlayerNames()
{
return true;
}

@ConfigItem(
position = 12,
keyName = "drawMinimapNames",
name = "Draw names on minimap",
description = "Configures whether or not minimap names for players with rendered names should be drawn"
Expand All @@ -169,7 +180,7 @@ default boolean drawMinimapNames()
}

@ConfigItem(
position = 12,
position = 13,
keyName = "colorPlayerMenu",
name = "Color player menu",
description = "Color right click menu for players"
Expand All @@ -180,7 +191,7 @@ default boolean colorPlayerMenu()
}

@ConfigItem(
position = 13,
position = 14,
keyName = "clanMenuIcons",
name = "Show clan rank in menu",
description = "Add clan rank to right click menu for players"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ private void renderPlayerOverlay(Graphics2D graphics, Player actor, Color color)
}
}

if (!config.drawOverheadPlayerNames())
{
return;
}

String name = actor.getName().replace('\u00A0', ' ');
int offset = actor.getLogicalHeight() + 40;
Point textLocation = actor.getCanvasTextLocation(graphics, name, offset);
Expand Down

0 comments on commit 633c390

Please sign in to comment.