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)59f*fq@|fggKZQ7#Q4bQqve17#NF#+?^QKos)Sv z(N4YojHioZNJit^vnP2EJMb_&X#W+TJ74~zoYGNIf#%BxV&=0=7gqP1V^R3%NGFVO zvU}2wx!#KuJKI#GCS`bl7*D=iOtk4^KKc2Adb9Jq9==i|ny4UU}N?tfHyWG_wMP<$rt&>7(;s%vZx#~wNnd_^_K=6KAZBa@G) z>e!r)K6K#n7S%V_=c5ko;a;M;X7{1ULp!{usOIcG7IA1xcZ;gd?o;81Hk>X|eY5La z*r7GjDXMFB9S%LTB05AhXV>wNLrZ46sOs!G9eilPZ4=cuJI@Cln!~Q5x~B3_;Gr4r zBC0u+#{v#bX=hQ@sm!Y7be4;bJJk0)Y`Q^m(^1tmGZJ$-m6t_C9cr@-n`V$WsZ~{H zMrtf4^RmdWL;oworhcefXTKhu}<{PL)vL+^KnP5Dr@iB+{`-rD^w$1iW4{-J!| zJE41G8F~-1Tki?Yo0g&bFunJjP@Gt%&co!X`-J4CWokc+pSw=zo@kcV!|0{+gyv1n z(tH@cwofQdG+X0g@YY{Ka#OYSANucoC3Me3L+_z?`z@h)TQqbZy7!+FiZjvFdFVWS zmyp~RP3?zu^H&L-Gxs{l@mzXoO3UZoAfrP+-83a1)-0aVQ?M`4%gy4xhN|+M{3(+J fk(A}et(VsmlVV)CWm!D~0|SGntDnm{r-UW|g*#Bd 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;