mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-14 09:47:24 +07:00
New unit select fixes
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 765 B After Width: | Height: | Size: 310 B |
@ -16,10 +16,10 @@ import mindustry.world.*;
|
|||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class OverlayRenderer{
|
public class OverlayRenderer{
|
||||||
private static final TextureRegion arrowRegion = Core.atlas.find("select-arrow");
|
|
||||||
private static final float indicatorLength = 14f;
|
private static final float indicatorLength = 14f;
|
||||||
private static final float spawnerMargin = tilesize*11f;
|
private static final float spawnerMargin = tilesize*11f;
|
||||||
private static final Rect rect = new Rect();
|
private static final Rect rect = new Rect();
|
||||||
|
|
||||||
private float buildFade, unitFade;
|
private float buildFade, unitFade;
|
||||||
private Unit lastSelect;
|
private Unit lastSelect;
|
||||||
|
|
||||||
@ -89,12 +89,12 @@ public class OverlayRenderer{
|
|||||||
Draw.rect(select.type.icon(Cicon.full), select.x(), select.y(), select.rotation() - 90);
|
Draw.rect(select.type.icon(Cicon.full), select.x(), select.y(), select.rotation() - 90);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for(int i = 0; i < 4; i++){
|
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);
|
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();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,7 +374,7 @@ public class DesktopInput extends InputHandler{
|
|||||||
int cursorY = tileY(Core.input.mouseY());
|
int cursorY = tileY(Core.input.mouseY());
|
||||||
int rawCursorX = World.toTile(Core.input.mouseWorld().x), rawCursorY = World.toTile(Core.input.mouseWorld().y);
|
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()){
|
if(Core.settings.getBool("buildautopause") && isBuilding && !player.unit().isBuilding()){
|
||||||
isBuilding = false;
|
isBuilding = false;
|
||||||
buildWasAutoPaused = true;
|
buildWasAutoPaused = true;
|
||||||
|
Reference in New Issue
Block a user