only draw fps when we have an x value for the xp orb

This commit is contained in:
Steve
2017-06-23 18:30:07 +01:00
committed by Adam
parent 417927edc9
commit 60eb6fe99d

View File

@@ -75,6 +75,10 @@ public class FPSOverlay extends Overlay
}
Rectangle2D bounds = xpOrb.getBounds().getBounds2D();
if (bounds.getX() <= 0)
{
return null;
}
int x = (int) (bounds.getX() + ((bounds.getWidth() / 2) - (fm.stringWidth(str) / 2)));
int y = (int) (bounds.getY() - (fm.getHeight() / 2));