diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index 83ee32a9c9..3335642327 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -1625,22 +1625,18 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ if(withText){ Font font = Fonts.outline; font.setColor(col2); - var ints = font.usesIntegerPositions(); + boolean ints = font.usesIntegerPositions(); font.setUseIntegerPositions(false); - var z = Draw.z(); + float z = Draw.z(); Draw.z(Layer.endPixeled); font.getData().setScale(1 / renderer.camerascale); - var snapToCursor = Core.settings.getBool("selectionsizeoncursor"); - var textOffset = Core.settings.getInt("selectionsizeoncursoroffset", 5); int width = (int)((result.x2 - result.x) / 8); int height = (int)((result.y2 - result.y) / 8); int area = width * height; - // FINISHME: When not snapping to cursor, perhaps it would be best to choose the corner closest to the cursor that's at least a block away? font.draw(width + "x" + height + " (" + area + ")", - snapToCursor ? input.mouseWorldX() + textOffset * (4 / renderer.camerascale) : result.x2, - snapToCursor ? input.mouseWorldY() - textOffset * (4 / renderer.camerascale) : result.y - ); + input.mouseWorldX() + 5 * (4 / renderer.camerascale), + input.mouseWorldY() - 5 * (4 / renderer.camerascale)); font.setColor(Color.white); font.getData().setScale(1); font.setUseIntegerPositions(ints);