Removed grounditems.fontStyle option
This commit is contained in:
@@ -30,7 +30,6 @@ import net.runelite.client.config.Alpha;
|
|||||||
import net.runelite.client.config.Config;
|
import net.runelite.client.config.Config;
|
||||||
import net.runelite.client.config.ConfigGroup;
|
import net.runelite.client.config.ConfigGroup;
|
||||||
import net.runelite.client.config.ConfigItem;
|
import net.runelite.client.config.ConfigItem;
|
||||||
import net.runelite.client.config.FontType;
|
|
||||||
import net.runelite.client.plugins.grounditems.config.ItemHighlightMode;
|
import net.runelite.client.plugins.grounditems.config.ItemHighlightMode;
|
||||||
import net.runelite.client.plugins.grounditems.config.MenuHighlightMode;
|
import net.runelite.client.plugins.grounditems.config.MenuHighlightMode;
|
||||||
import net.runelite.client.plugins.grounditems.config.PriceDisplayMode;
|
import net.runelite.client.plugins.grounditems.config.PriceDisplayMode;
|
||||||
@@ -356,14 +355,4 @@ public interface GroundItemsConfig extends Config
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
|
||||||
keyName = "fontType",
|
|
||||||
name = "Font type",
|
|
||||||
description = "Configures the font type to use when drawing items",
|
|
||||||
position = 27
|
|
||||||
)
|
|
||||||
default FontType fontStyle()
|
|
||||||
{
|
|
||||||
return FontType.REGULAR;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,6 @@ package net.runelite.client.plugins.grounditems;
|
|||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Font;
|
|
||||||
import java.awt.FontMetrics;
|
import java.awt.FontMetrics;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.Polygon;
|
import java.awt.Polygon;
|
||||||
@@ -102,11 +101,6 @@ public class GroundItemsOverlay extends Overlay
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Font originalFont = graphics.getFont();
|
|
||||||
final Font font = config.fontStyle().getFont();
|
|
||||||
|
|
||||||
graphics.setFont(font);
|
|
||||||
|
|
||||||
final FontMetrics fm = graphics.getFontMetrics();
|
final FontMetrics fm = graphics.getFontMetrics();
|
||||||
|
|
||||||
offsetMap.clear();
|
offsetMap.clear();
|
||||||
@@ -344,9 +338,6 @@ public class GroundItemsOverlay extends Overlay
|
|||||||
textComponent.setPosition(new java.awt.Point(textX, textY));
|
textComponent.setPosition(new java.awt.Point(textX, textY));
|
||||||
textComponent.render(graphics);
|
textComponent.render(graphics);
|
||||||
}
|
}
|
||||||
|
|
||||||
graphics.setFont(originalFont);
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,17 +27,19 @@ package net.runelite.client.ui.overlay.components;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class TextComponentTest
|
public class TextComponentTest
|
||||||
{
|
{
|
||||||
private Graphics2D graphics;
|
private Graphics2D graphics;
|
||||||
|
private BufferedImage dest;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void before()
|
public void before()
|
||||||
{
|
{
|
||||||
BufferedImage dest = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
|
dest = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
|
||||||
graphics = (Graphics2D) dest.getGraphics();
|
graphics = (Graphics2D) dest.getGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,4 +67,11 @@ public class TextComponentTest
|
|||||||
textComponent.setText("<col=0000ff>test<col=00ff00> test");
|
textComponent.setText("<col=0000ff>test<col=00ff00> test");
|
||||||
textComponent.render(graphics);
|
textComponent.render(graphics);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void after() {
|
||||||
|
graphics.dispose();
|
||||||
|
dest.flush();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user