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:
@@ -134,4 +134,15 @@ public interface PlayerIndicatorsConfig extends Config
|
|||||||
{
|
{
|
||||||
return false;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,5 +112,15 @@ public class PlayerIndicatorsOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
OverlayUtil.renderTextLocation(graphics, textLocation, name, color);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user