From f812460164ce8e3136984850d5f7779321c48ee3 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 19 Jan 2021 15:49:30 -0500 Subject: [PATCH] New unit select fixes --- .../assets-raw/sprites/effects/select-arrow.png | Bin 765 -> 310 bytes .../src/mindustry/graphics/OverlayRenderer.java | 8 ++++---- core/src/mindustry/input/DesktopInput.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/assets-raw/sprites/effects/select-arrow.png b/core/assets-raw/sprites/effects/select-arrow.png index 023cf217480a505241a4d88dddf71baae66aa377..41c2608d8b95e40b9d7575465466dc9102f96347 100644 GIT binary patch delta 281 zcmey%x{XP%Gr-TCmrII^fq{Y7)59eQNT+}>2Q!d#w@FO{QjEnx?oJHr&dI!-Xs2F( z#?!?yB%|@|*^|779e9`>wEv3FoiG1UPU)zqK=b7TG4t7`3#s!Ll)kJk44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h2Ka=y0_p$%{{zY5W6gy?in%1nFBm9r{S+@yEdytPM`SSr1K%MKW)#)% zYG7bs%JXz_45^5Fd;Vl8vmp;l;OU?2Z@uTfnP|byDE9XkJ3~or?SFC2kDi_WUNu3F zCJW7<@?*&nbyYhW2yN4;l)bsJ<>mgIh(n+5f74Fw*6auIjisAUfQx#J}2nVE&p#CiErGar)>DTS=MWY z)dojSZ}&f{JhGRjZzw(!cj%1p6V){~hhq<&2)?44V{<&_(2>bURCR1lM;|(Hd5h{B z>+?~E_HZvzU9cM;W`%3}eCrnIxD z>QrXcayrXJ#~tc>9yZ+|x#_6tni+|?oXX20q7JoLhD|d_oYbnSGb1&YlX+QW*rETG zVN*ZUEpk<@nV;#)d473R(4qG`!=`+w+Qh0_GjHwwmgASVPXAE8@14*+u?)S3*{%14 z=1t4ceVE>RPAE<+Q|Dpw)O|v7(=xRm#?M_RbWb!(>tXcLc|!B1W@$bQU)v`XCz`GC zFnH@PA-SpA`Vam0z7o1;qM`TDyZx5Xye%5K58eAu3B{Rc>O6FwzDr1Mi>CI&y7{Yw z&Y63id~AUHx3vIVCg!0EIhHzyJUM diff --git a/core/src/mindustry/graphics/OverlayRenderer.java b/core/src/mindustry/graphics/OverlayRenderer.java index 2b1dc76ef7..fc1ff87726 100644 --- a/core/src/mindustry/graphics/OverlayRenderer.java +++ b/core/src/mindustry/graphics/OverlayRenderer.java @@ -16,10 +16,10 @@ import mindustry.world.*; import static mindustry.Vars.*; public class OverlayRenderer{ - private static final TextureRegion arrowRegion = Core.atlas.find("select-arrow"); private static final float indicatorLength = 14f; private static final float spawnerMargin = tilesize*11f; private static final Rect rect = new Rect(); + private float buildFade, unitFade; private Unit lastSelect; @@ -89,12 +89,12 @@ public class OverlayRenderer{ Draw.rect(select.type.icon(Cicon.full), select.x(), select.y(), select.rotation() - 90); } - for(int i = 0; i < 4; i++){ - float rot = i * 90f + 45f + (-Time.time / 3f) % 360f; + float rot = i * 90f + 45f + (-Time.time / 1.5f) % 360f; float length = select.hitSize() * 1.5f + (unitFade * 2.5f); - Draw.rect(arrowRegion, select.x + Angles.trnsx(rot, length), select.y + Angles.trnsy(rot, length), length / 1.9f, length / 1.9f, rot - 135f); + Draw.rect("select-arrow", select.x + Angles.trnsx(rot, length), select.y + Angles.trnsy(rot, length), length / 1.9f, length / 1.9f, rot - 135f); } + Draw.reset(); } diff --git a/core/src/mindustry/input/DesktopInput.java b/core/src/mindustry/input/DesktopInput.java index 06e980f7d3..203108f036 100644 --- a/core/src/mindustry/input/DesktopInput.java +++ b/core/src/mindustry/input/DesktopInput.java @@ -374,7 +374,7 @@ public class DesktopInput extends InputHandler{ int cursorY = tileY(Core.input.mouseY()); int rawCursorX = World.toTile(Core.input.mouseWorld().x), rawCursorY = World.toTile(Core.input.mouseWorld().y); - // automatically pause building if the current build queue is empty + //automatically pause building if the current build queue is empty if(Core.settings.getBool("buildautopause") && isBuilding && !player.unit().isBuilding()){ isBuilding = false; buildWasAutoPaused = true;