diff --git a/src/main/java/Snake/TextView.java b/src/main/java/Snake/TextView.java index 4fd6078..e68bacf 100644 --- a/src/main/java/Snake/TextView.java +++ b/src/main/java/Snake/TextView.java @@ -50,10 +50,10 @@ public class TextView implements Drawable { FontMetrics fontMetrics = g.getFontMetrics(); int x = position.x; - int y = position.y + fontMetrics.getHeight(); + int y = position.y + fontMetrics.getHeight() / 2; if (anchor == AnchorType.Center) - x -= fontMetrics.stringWidth(text); + x -= fontMetrics.stringWidth(text) / 2; else if (anchor == AnchorType.Right) x -= fontMetrics.stringWidth(text);