Skip to content

Commit

Permalink
don't render selection size text unless at least 2 chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Sep 1, 2024
1 parent e18250e commit 4787be8
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ public void renderTileSelectionSize(
if (selection == null) return;
var sideLen = Math.abs(Math.abs(selection.getRight()) - Math.abs(selection.getLeft()))+1;
var heightLen = Math.abs(Math.abs(selection.getBottom()) - Math.abs(selection.getTop()))+1;
if (sideLen <= 1 && heightLen <= 1) return;
// todo: it'd be better if we could render this directly on the highlight
// but we need a function for map -> screen coordinates translation
MapRenderHelper.drawCenteredStringWithBackground(guiGraphics, font, sideLen + " x " + heightLen, scaledMouseX, scaledMouseY - font.lineHeight, -1, 0.0f, 0.0f, 0.0f, 0.4f, backgroundVertexBuffer);
Expand Down

0 comments on commit 4787be8

Please sign in to comment.