mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-28 07:22:21 -08:00
Serpulo transport stuff + qol (#10706)
* death penalty, instant * idk if to leave to exactly 11/s or 12/s * yass display changes * broke * hhh * a * welp, good enough * ok fixed * totally not stealing from foos. Yup * revert dump * a
This commit is contained in:
parent
ec6740c8da
commit
2d8e99339b
7 changed files with 68 additions and 5 deletions
|
|
@ -32,6 +32,7 @@ import mindustry.input.Placement.*;
|
|||
import mindustry.net.Administration.*;
|
||||
import mindustry.net.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.ui.fragments.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.blocks.ConstructBlock.*;
|
||||
|
|
@ -1539,6 +1540,28 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
Lines.rect(result.x, result.y - 1, result.x2 - result.x, result.y2 - result.y);
|
||||
Draw.color(col2);
|
||||
Lines.rect(result.x, result.y, result.x2 - result.x, result.y2 - result.y);
|
||||
|
||||
Font font = Fonts.outline;
|
||||
font.setColor(col2);
|
||||
var ints = font.usesIntegerPositions();
|
||||
font.setUseIntegerPositions(false);
|
||||
var 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
|
||||
);
|
||||
font.setColor(Color.white);
|
||||
font.getData().setScale(1);
|
||||
font.setUseIntegerPositions(ints);
|
||||
Draw.z(z);
|
||||
}
|
||||
|
||||
protected void flushSelectPlans(Seq<BuildPlan> plans){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue