Add support for drawing names on minimap

Add support to Player Indicators plugin to draw names on minimap
(disabled by default).

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-03-07 11:08:09 +01:00
parent 88c2804ed4
commit da7f7a01ee
2 changed files with 21 additions and 0 deletions

View File

@@ -134,4 +134,15 @@ public interface PlayerIndicatorsConfig extends Config
{
return false;
}
@ConfigItem(
position = 9,
keyName = "drawMinimapNames",
name = "Draw names on minimap",
description = "Configures whether or not minimap names for players with rendered names should be drawn"
)
default boolean drawMinimapNames()
{
return false;
}
}

View File

@@ -112,5 +112,15 @@ public class PlayerIndicatorsOverlay extends Overlay
{
OverlayUtil.renderTextLocation(graphics, textLocation, name, color);
}
if (config.drawMinimapNames())
{
final net.runelite.api.Point minimapLocation = actor.getMinimapLocation();
if (minimapLocation != null)
{
OverlayUtil.renderTextLocation(graphics, minimapLocation, name, color);
}
}
}
}