Merge pull request #2452 from Reasel/Add-Tooltip-FontType-Dropdown
Add tooltip font type dropdown
This commit is contained in:
@@ -189,11 +189,22 @@ public interface RuneLiteConfig extends Config
|
||||
return FontType.SMALL;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "tooltipFontType",
|
||||
name = "Tooltip Font",
|
||||
description = "Configures what font type is used for in-game tooltips such as food stats, NPC names, etc.",
|
||||
position = 31
|
||||
)
|
||||
default FontType tooltipFontType()
|
||||
{
|
||||
return FontType.SMALL;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "infoBoxVertical",
|
||||
name = "Display infoboxes vertically",
|
||||
description = "Toggles the infoboxes to display vertically",
|
||||
position = 31
|
||||
position = 32
|
||||
)
|
||||
default boolean infoBoxVertical()
|
||||
{
|
||||
@@ -204,7 +215,7 @@ public interface RuneLiteConfig extends Config
|
||||
keyName = "infoBoxWrap",
|
||||
name = "Infobox wrap count",
|
||||
description = "Configures the amount of infoboxes shown before wrapping",
|
||||
position = 32
|
||||
position = 33
|
||||
)
|
||||
default int infoBoxWrap()
|
||||
{
|
||||
|
||||
@@ -517,7 +517,7 @@ public class OverlayRenderer extends MouseListener implements KeyListener
|
||||
}
|
||||
else if (position == OverlayPosition.TOOLTIP)
|
||||
{
|
||||
subGraphics.setFont(FontManager.getRunescapeSmallFont());
|
||||
subGraphics.setFont(runeLiteConfig.tooltipFontType().getFont());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ public class TooltipComponent implements RenderableEntity
|
||||
// Tooltip size
|
||||
final FontMetrics metrics = graphics.getFontMetrics();
|
||||
final int textDescent = metrics.getDescent();
|
||||
final int textHeight = graphics.getFontMetrics().getHeight();
|
||||
final int textHeight = metrics.getHeight();
|
||||
int tooltipWidth = 0;
|
||||
int tooltipHeight = 0;
|
||||
String[] lines = BR.split(text);
|
||||
|
||||
Reference in New Issue
Block a user