Add option to choose interface (layoutable) overlay font
Closes #1716 Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -207,11 +207,22 @@ public interface RuneLiteConfig extends Config
|
|||||||
return FontType.SMALL;
|
return FontType.SMALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "interfaceFontType",
|
||||||
|
name = "Interface Overlay Font",
|
||||||
|
description = "Configures what font type is used for in-game interface overlays such as panels, opponent info, clue scrolls etc.",
|
||||||
|
position = 32
|
||||||
|
)
|
||||||
|
default FontType interfaceFontType()
|
||||||
|
{
|
||||||
|
return FontType.REGULAR;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "infoBoxVertical",
|
keyName = "infoBoxVertical",
|
||||||
name = "Display infoboxes vertically",
|
name = "Display infoboxes vertically",
|
||||||
description = "Toggles the infoboxes to display vertically",
|
description = "Toggles the infoboxes to display vertically",
|
||||||
position = 32
|
position = 33
|
||||||
)
|
)
|
||||||
default boolean infoBoxVertical()
|
default boolean infoBoxVertical()
|
||||||
{
|
{
|
||||||
@@ -222,7 +233,7 @@ public interface RuneLiteConfig extends Config
|
|||||||
keyName = "infoBoxWrap",
|
keyName = "infoBoxWrap",
|
||||||
name = "Infobox wrap count",
|
name = "Infobox wrap count",
|
||||||
description = "Configures the amount of infoboxes shown before wrapping",
|
description = "Configures the amount of infoboxes shown before wrapping",
|
||||||
position = 33
|
position = 34
|
||||||
)
|
)
|
||||||
default int infoBoxWrap()
|
default int infoBoxWrap()
|
||||||
{
|
{
|
||||||
@@ -233,7 +244,7 @@ public interface RuneLiteConfig extends Config
|
|||||||
keyName = "infoBoxSize",
|
keyName = "infoBoxSize",
|
||||||
name = "Infobox size (px)",
|
name = "Infobox size (px)",
|
||||||
description = "Configures the size of each infobox in pixels",
|
description = "Configures the size of each infobox in pixels",
|
||||||
position = 34
|
position = 35
|
||||||
)
|
)
|
||||||
default int infoBoxSize()
|
default int infoBoxSize()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ import net.runelite.client.input.KeyListener;
|
|||||||
import net.runelite.client.input.KeyManager;
|
import net.runelite.client.input.KeyManager;
|
||||||
import net.runelite.client.input.MouseListener;
|
import net.runelite.client.input.MouseListener;
|
||||||
import net.runelite.client.input.MouseManager;
|
import net.runelite.client.input.MouseManager;
|
||||||
import net.runelite.client.ui.FontManager;
|
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class OverlayRenderer extends MouseListener implements KeyListener
|
public class OverlayRenderer extends MouseListener implements KeyListener
|
||||||
@@ -371,7 +370,7 @@ public class OverlayRenderer extends MouseListener implements KeyListener
|
|||||||
final OverlayPosition position = overlay.getPosition();
|
final OverlayPosition position = overlay.getPosition();
|
||||||
|
|
||||||
// Set font based on configuration
|
// Set font based on configuration
|
||||||
if (position == OverlayPosition.DYNAMIC)
|
if (position == OverlayPosition.DYNAMIC || position == OverlayPosition.DETACHED)
|
||||||
{
|
{
|
||||||
subGraphics.setFont(runeLiteConfig.fontType().getFont());
|
subGraphics.setFont(runeLiteConfig.fontType().getFont());
|
||||||
}
|
}
|
||||||
@@ -381,7 +380,7 @@ public class OverlayRenderer extends MouseListener implements KeyListener
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
subGraphics.setFont(FontManager.getRunescapeFont());
|
subGraphics.setFont(runeLiteConfig.interfaceFontType().getFont());
|
||||||
}
|
}
|
||||||
|
|
||||||
subGraphics.translate(point.x, point.y);
|
subGraphics.translate(point.x, point.y);
|
||||||
|
|||||||
Reference in New Issue
Block a user