From da7f7a01eebd99cca6cb8fc5df61970aa8d51856 Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Wed, 7 Mar 2018 11:08:09 +0100 Subject: [PATCH] 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 --- .../playerindicators/PlayerIndicatorsConfig.java | 11 +++++++++++ .../playerindicators/PlayerIndicatorsOverlay.java | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsConfig.java index 3e4d7b5ba8..3475bc44af 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsConfig.java @@ -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; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java index ca80b48859..264227745b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java @@ -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); + } + } } }