config: Add infobox component outline option
Co-authored-by: Jordan Atwood <jordan.atwood423@gmail.com>
This commit is contained in:
@@ -355,11 +355,23 @@ public interface RuneLiteConfig extends Config
|
|||||||
return 35;
|
return 35;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "infoBoxTextOutline",
|
||||||
|
name = "Outline infobox text",
|
||||||
|
description = "Draw a full outline instead of a simple shadow for infobox text",
|
||||||
|
position = 43,
|
||||||
|
section = overlaySettings
|
||||||
|
)
|
||||||
|
default boolean infoBoxTextOutline()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "overlayBackgroundColor",
|
keyName = "overlayBackgroundColor",
|
||||||
name = "Overlay Color",
|
name = "Overlay Color",
|
||||||
description = "Configures the background color of infoboxes and overlays",
|
description = "Configures the background color of infoboxes and overlays",
|
||||||
position = 43,
|
position = 44,
|
||||||
section = overlaySettings
|
section = overlaySettings
|
||||||
)
|
)
|
||||||
@Alpha
|
@Alpha
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ public class InfoBoxComponent implements LayoutableRenderableEntity
|
|||||||
private Dimension preferredSize = new Dimension(DEFAULT_SIZE, DEFAULT_SIZE);
|
private Dimension preferredSize = new Dimension(DEFAULT_SIZE, DEFAULT_SIZE);
|
||||||
private String text;
|
private String text;
|
||||||
private Color color = Color.WHITE;
|
private Color color = Color.WHITE;
|
||||||
|
private boolean outline;
|
||||||
private Color backgroundColor = ComponentConstants.STANDARD_BACKGROUND_COLOR;
|
private Color backgroundColor = ComponentConstants.STANDARD_BACKGROUND_COLOR;
|
||||||
private BufferedImage image;
|
private BufferedImage image;
|
||||||
@Getter
|
@Getter
|
||||||
@@ -94,6 +95,7 @@ public class InfoBoxComponent implements LayoutableRenderableEntity
|
|||||||
{
|
{
|
||||||
final TextComponent textComponent = new TextComponent();
|
final TextComponent textComponent = new TextComponent();
|
||||||
textComponent.setColor(color);
|
textComponent.setColor(color);
|
||||||
|
textComponent.setOutline(outline);
|
||||||
textComponent.setText(text);
|
textComponent.setText(text);
|
||||||
textComponent.setPosition(new Point(baseX + ((size - metrics.stringWidth(text)) / 2), baseY + size - SEPARATOR));
|
textComponent.setPosition(new Point(baseX + ((size - metrics.stringWidth(text)) / 2), baseY + size - SEPARATOR));
|
||||||
textComponent.render(graphics);
|
textComponent.render(graphics);
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ public class InfoBoxOverlay extends OverlayPanel
|
|||||||
{
|
{
|
||||||
infoBoxComponent.setColor(color);
|
infoBoxComponent.setColor(color);
|
||||||
}
|
}
|
||||||
|
infoBoxComponent.setOutline(config.infoBoxTextOutline());
|
||||||
infoBoxComponent.setImage(box.getScaledImage());
|
infoBoxComponent.setImage(box.getScaledImage());
|
||||||
infoBoxComponent.setTooltip(box.getTooltip());
|
infoBoxComponent.setTooltip(box.getTooltip());
|
||||||
infoBoxComponent.setPreferredSize(new Dimension(config.infoBoxSize(), config.infoBoxSize()));
|
infoBoxComponent.setPreferredSize(new Dimension(config.infoBoxSize(), config.infoBoxSize()));
|
||||||
|
|||||||
Reference in New Issue
Block a user