Skip to content

Commit

Permalink
Simplified and improved entity debug rendering.
Browse files Browse the repository at this point in the history
  • Loading branch information
steffen-wilke committed Jul 28, 2019
1 parent bdbde7d commit 16f0929
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/de/gurkenlabs/litiengine/graphics/DebugRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ public static void renderMapDebugInfo(final Graphics2D g, final IMap map) {
private static void drawMapId(final Graphics2D g, final IEntity entity) {
g.setColor(Color.RED);
g.setFont(g.getFont().deriveFont(Font.PLAIN, 4f));
final int x = (int) Game.world().camera().getViewportDimensionCenter(entity).getX() + 10;
final int y = (int) Game.world().camera().getViewportDimensionCenter(entity).getY();
final double x = Game.world().camera().getViewportDimensionCenter(entity).getX() + 10;
final double y = Game.world().camera().getViewportDimensionCenter(entity).getY();
TextRenderer.render(g, Integer.toString(entity.getMapId()), x, y);
final String locationString = "[x:" + new DecimalFormat("##.##").format(entity.getX()) + ";y:" + new DecimalFormat("##.##").format(entity.getY()) + "]";
final String locationString = new DecimalFormat("##.##").format(entity.getX()) + ";" + new DecimalFormat("##.##").format(entity.getY());
TextRenderer.render(g, locationString, x, y + 5.0);
}

Expand Down

0 comments on commit 16f0929

Please sign in to comment.