notifier: Use ColorUtil functions
This commit is contained in:
@@ -49,6 +49,7 @@ import net.runelite.api.Client;
|
|||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
import net.runelite.client.config.RuneLiteConfig;
|
import net.runelite.client.config.RuneLiteConfig;
|
||||||
import net.runelite.client.ui.ClientUI;
|
import net.runelite.client.ui.ClientUI;
|
||||||
|
import net.runelite.client.util.ColorUtil;
|
||||||
import net.runelite.client.util.OSType;
|
import net.runelite.client.util.OSType;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
@@ -65,7 +66,7 @@ public class Notifier
|
|||||||
// Notifier properties
|
// Notifier properties
|
||||||
private static final Color FLASH_COLOR = new Color(255, 0, 0, 70);
|
private static final Color FLASH_COLOR = new Color(255, 0, 0, 70);
|
||||||
private static final int FLASH_DURATION = 2000;
|
private static final int FLASH_DURATION = 2000;
|
||||||
private static final String MESSAGE_COLOR = "FF0000";
|
private static final Color MESSAGE_COLOR = Color.RED;
|
||||||
|
|
||||||
private final Provider<Client> client;
|
private final Provider<Client> client;
|
||||||
private final String appName;
|
private final String appName;
|
||||||
@@ -133,7 +134,7 @@ public class Notifier
|
|||||||
if (client != null && client.getGameState() == GameState.LOGGED_IN)
|
if (client != null && client.getGameState() == GameState.LOGGED_IN)
|
||||||
{
|
{
|
||||||
client.addChatMessage(ChatMessageType.GAME, appName,
|
client.addChatMessage(ChatMessageType.GAME, appName,
|
||||||
"<col=" + MESSAGE_COLOR + ">" + message + "</col>", "");
|
ColorUtil.wrapWithColorTag(message, MESSAGE_COLOR), "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user