Center hints
This commit is contained in:
parent
ce738abbc8
commit
48a9fa11e4
1 changed files with 2 additions and 1 deletions
|
@ -71,7 +71,8 @@ public class Renderer {
|
||||||
for (int i=0; i<lines.length; i++) {
|
for (int i=0; i<lines.length; i++) {
|
||||||
String line = lines[i];
|
String line = lines[i];
|
||||||
bounds = font.getStringBounds(line, frc);
|
bounds = font.getStringBounds(line, frc);
|
||||||
graphics2D.drawString(line, x, y + (textHeight * i));
|
double padding = (TILE_SIZE - bounds.getWidth()) / 2;
|
||||||
|
graphics2D.drawString(line, x + (int)padding, y + (textHeight * i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue