Merge pull request #1266 from sethtroll/fixgrounditemboxes
ground item overlay: Fix boxes appearing very small with small font
This commit is contained in:
@@ -195,23 +195,22 @@ public class GroundItemsOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
final int stringWidth = fm.stringWidth(itemString);
|
final int stringWidth = fm.stringWidth(itemString);
|
||||||
final int stringHeight = fm.getHeight();
|
final int stringHeight = fm.getHeight();
|
||||||
final int descent = fm.getDescent();
|
|
||||||
|
|
||||||
// Hidden box
|
// Hidden box
|
||||||
final Rectangle itemHiddenBox = new Rectangle(
|
final Rectangle itemHiddenBox = new Rectangle(
|
||||||
textX + stringWidth,
|
textX + stringWidth,
|
||||||
textY - (stringHeight / 2) - descent,
|
textY - (RECTANGLE_SIZE + stringHeight) / 2,
|
||||||
RECTANGLE_SIZE,
|
RECTANGLE_SIZE,
|
||||||
stringHeight / 2);
|
RECTANGLE_SIZE);
|
||||||
|
|
||||||
plugin.getHiddenBoxes().put(itemHiddenBox, item.getName());
|
plugin.getHiddenBoxes().put(itemHiddenBox, item.getName());
|
||||||
|
|
||||||
// Highlight box
|
// Highlight box
|
||||||
final Rectangle itemHighlightBox = new Rectangle(
|
final Rectangle itemHighlightBox = new Rectangle(
|
||||||
textX + stringWidth + RECTANGLE_SIZE + 2,
|
textX + stringWidth + RECTANGLE_SIZE + 2,
|
||||||
textY - (stringHeight / 2) - descent,
|
textY - (RECTANGLE_SIZE + stringHeight) / 2,
|
||||||
RECTANGLE_SIZE,
|
RECTANGLE_SIZE,
|
||||||
stringHeight / 2);
|
RECTANGLE_SIZE);
|
||||||
|
|
||||||
plugin.getHighlightBoxes().put(itemHighlightBox, item.getName());
|
plugin.getHighlightBoxes().put(itemHighlightBox, item.getName());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user