Change font on boosts overlay (#793)

* Update CombatIconsOverlay.java

* Make it a config option
This commit is contained in:
GROUNDBOI
2019-06-28 16:12:28 -04:00
committed by James
parent 38d9800d10
commit 2af2715ac8
2 changed files with 22 additions and 5 deletions

View File

@@ -82,11 +82,22 @@ public interface BoostsConfig extends Config
return false; return false;
} }
@ConfigItem(
keyName = "boldIconFont",
name = "Bold Font for Icons",
description = "",
position = 5
)
default boolean boldIconFont()
{
return false;
}
@ConfigItem( @ConfigItem(
keyName = "displayNextBuffChange", keyName = "displayNextBuffChange",
name = "Display next buff change", name = "Display next buff change",
description = "Configures whether or not to display when the next buffed stat change will be", description = "Configures whether or not to display when the next buffed stat change will be",
position = 5 position = 6
) )
default DisplayChangeMode displayNextBuffChange() default DisplayChangeMode displayNextBuffChange()
{ {
@@ -97,7 +108,7 @@ public interface BoostsConfig extends Config
keyName = "displayNextDebuffChange", keyName = "displayNextDebuffChange",
name = "Display next debuff change", name = "Display next debuff change",
description = "Configures whether or not to display when the next debuffed stat change will be", description = "Configures whether or not to display when the next debuffed stat change will be",
position = 6 position = 7
) )
default DisplayChangeMode displayNextDebuffChange() default DisplayChangeMode displayNextDebuffChange()
{ {
@@ -108,7 +119,7 @@ public interface BoostsConfig extends Config
keyName = "boostThreshold", keyName = "boostThreshold",
name = "Boost Amount Threshold", name = "Boost Amount Threshold",
description = "The amount of levels boosted to send a notification at. A value of 0 will disable notification.", description = "The amount of levels boosted to send a notification at. A value of 0 will disable notification.",
position = 7 position = 8
) )
default int boostThreshold() default int boostThreshold()
{ {
@@ -119,7 +130,7 @@ public interface BoostsConfig extends Config
keyName = "groupNotifications", keyName = "groupNotifications",
name = "Group Notifications", name = "Group Notifications",
description = "Configures whether or not to group notifications for multiple skills into a single notification", description = "Configures whether or not to group notifications for multiple skills into a single notification",
position = 8 position = 9
) )
default boolean groupNotifications() default boolean groupNotifications()
{ {

View File

@@ -19,6 +19,7 @@ import net.runelite.client.ui.overlay.components.ComponentOrientation;
import net.runelite.client.ui.overlay.components.ImageComponent; import net.runelite.client.ui.overlay.components.ImageComponent;
import net.runelite.client.ui.overlay.components.LineComponent; import net.runelite.client.ui.overlay.components.LineComponent;
import net.runelite.client.ui.overlay.components.PanelComponent; import net.runelite.client.ui.overlay.components.PanelComponent;
import net.runelite.client.ui.FontManager;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
import net.runelite.client.util.ImageUtil; import net.runelite.client.util.ImageUtil;
@@ -51,6 +52,11 @@ class CombatIconsOverlay extends Overlay
return null; return null;
} }
if (config.boldIconFont())
{
graphics.setFont(FontManager.getRunescapeBoldFont());
}
panelComponent.getChildren().clear(); panelComponent.getChildren().clear();
panelComponent.setPreferredSize(new Dimension(28, 0)); panelComponent.setPreferredSize(new Dimension(28, 0));
panelComponent.setWrapping(2); panelComponent.setWrapping(2);