Merge pull request #5736 from Nightfirecat/remove-color-tags

Use ColorUtil functions instead of creating the color tag manually
This commit is contained in:
Tomas Slusny
2018-10-01 22:31:38 +02:00
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@@ -40,6 +40,7 @@ import net.runelite.client.game.ClanManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.ui.overlay.OverlayManager;
import net.runelite.client.util.ColorUtil;
@PluginDescriptor(
name = "Player Indicators",
@@ -169,7 +170,7 @@ public class PlayerIndicatorsPlugin extends Plugin
target = target.substring(idx + 1);
}
lastEntry.setTarget("<col=" + Integer.toHexString(color.getRGB() & 0xFFFFFF) + ">" + target);
lastEntry.setTarget(ColorUtil.prependColorTag(target, color));
}
if (image != -1 && config.showClanRanks())

View File

@@ -27,6 +27,7 @@ package net.runelite.client.plugins.wasdcamera;
import com.google.common.eventbus.Subscribe;
import com.google.inject.Provides;
import java.awt.Color;
import javax.inject.Inject;
import lombok.AccessLevel;
import lombok.Getter;
@@ -43,6 +44,7 @@ import net.runelite.client.config.ConfigManager;
import net.runelite.client.input.KeyManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.util.ColorUtil;
@PluginDescriptor(
name = "WASD Camera",
@@ -175,7 +177,7 @@ public class WASDCameraPlugin extends Plugin
{
if (client.getGameState() == GameState.LOGGED_IN)
{
chatboxInput.setText(client.getLocalPlayer().getName() + ": <col=0000ff>" + client.getVar(VarClientStr.CHATBOX_TYPED_TEXT) + "*</col>");
chatboxInput.setText(client.getLocalPlayer().getName() + ": " + ColorUtil.wrapWithColorTag(client.getVar(VarClientStr.CHATBOX_TYPED_TEXT) + "*", Color.BLUE));
}
}
}