From d0092b4cd9b65ae6e0aa827c2cfa0cdf139ad703 Mon Sep 17 00:00:00 2001 From: BlackDeluxeCat <65377021+BlackDeluxeCat@users.noreply.github.com> Date: Sat, 16 Mar 2024 14:44:13 +0800 Subject: [PATCH] fix, i dont know --- src/mi2u/graphics/RendererExt.java | 2 +- src/mi2u/ui/MinimapMindow.java | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mi2u/graphics/RendererExt.java b/src/mi2u/graphics/RendererExt.java index 7324675..fafac84 100644 --- a/src/mi2u/graphics/RendererExt.java +++ b/src/mi2u/graphics/RendererExt.java @@ -683,7 +683,7 @@ public static void drawTurretZone(BaseTurret.BaseTurretBuild btb){ Draw.alpha(animatedshields ? 1f : 0.5f); Lines.circle(btb.x, btb.y, range + 1); - Draw.color(turretZoneAAColor ? (((Turret)btb.block).targetAir ? Color.cyan : Color.darkGray) : turretZoneBlockColor ? MI2UTmp.c1.set(TurretZoneDrawer.blockColor(btb.block.id)) : btb.team.color); + Draw.color(turretZoneAAColor && btb.block instanceof Turret tu ? (tu.targetAir ? Color.cyan : Color.darkGray) : turretZoneBlockColor ? MI2UTmp.c1.set(TurretZoneDrawer.blockColor(btb.block.id)) : btb.team.color); Draw.alpha(animatedshields ? 0.3f : 0.08f); Fill.poly(btb.x, btb.y, (int)(range) / 3, range); diff --git a/src/mi2u/ui/MinimapMindow.java b/src/mi2u/ui/MinimapMindow.java index d6b4600..6fdd2e8 100644 --- a/src/mi2u/ui/MinimapMindow.java +++ b/src/mi2u/ui/MinimapMindow.java @@ -101,7 +101,7 @@ public MinimapMindow(){ if(fullscreenTransparent){ ui.hudGroup.addChild(m); m.validate(); - m.color.a(0.4f); + m.color.a(0.2f); } setupCont(cont); }).width(32f).growY(); @@ -163,7 +163,7 @@ public void initSettings(){ public static class Minimap2 extends Element{ public Rect rect = new Rect(); private static final float baseSize = 16f; - public float zoom = 4; + public float zoom = 8f; public boolean drawLabel = false, drawSpawn = true, drawFog = true, drawIndicator = true, drawObjective = true; public float drawUnitOutline = 0f; @@ -320,6 +320,7 @@ public void drawEntities(float x, float y, float w, float h, float scaling, bool Core.graphics.getWidth() / rect.width * w / renderer.getScale() , Core.graphics.getHeight() / rect.height * h / renderer.getScale()); Draw.color(); + Draw.alpha(color.a); //just render unit group Groups.unit.each(unit -> { @@ -336,7 +337,7 @@ public void drawEntities(float x, float y, float w, float h, float scaling, bool //color difference between block and unit in setting Draw.mixcol(MI2UTmp.c1.set(unit.team().color).mul(Mathf.clamp(1f - drawUnitColorDifference)), 1f); Draw.rect(region, x + rx, y + ry, scale, scale * (float)region.height / region.width, unit.rotation() - 90); - Draw.reset(); + Draw.mixcol(); }); //display labels @@ -364,7 +365,7 @@ public void drawEntities(float x, float y, float w, float h, float scaling, bool Tmp.tr1.set(dynamicTex); Tmp.tr1.set(region.u, 1f - region.v, region.u2, 1f - region.v2); - Draw.color(state.rules.dynamicColor); + Draw.color(state.rules.dynamicColor, state.rules.dynamicColor.a * color.a); Draw.rect(Tmp.tr1, x + w/2f, y + h/2f, w, h); if(state.rules.staticFog){ @@ -403,7 +404,7 @@ public void drawEntities(float x, float y, float w, float h, float scaling, bool Vec2 v = transform(Tmp.v1.set((ix + 0.5f + offset) * tilesize, (iy + 0.5f + offset) * tilesize)); //v.sub(getMarginBottom(), getMarginBottom()); - Draw.color(Color.orange, Color.scarlet, Mathf.clamp(time / 70f)); + Draw.color(Color.orange, Color.scarlet, Mathf.clamp(time / 70f) * color.a); Lines.square(x + v.x, y + v.y, rad); } @@ -429,7 +430,7 @@ public void drawSpawns(float x, float y, float w, float h, float scaling){ Lines.stroke(Scl.scl(1f)); - Draw.color(state.rules.waveTeam.color, Tmp.c2.set(state.rules.waveTeam.color).value(1.2f), Mathf.absin(Time.time, 16f, 1f)); + Draw.color(state.rules.waveTeam.color, Tmp.c2.set(state.rules.waveTeam.color).value(1.2f), Mathf.absin(Time.time, 16f, 1f) * color.a); float curve = Mathf.curve(Time.time % 240f, 120f, 240f); @@ -475,9 +476,8 @@ public void drawLabel(float x, float y, String text, Color color){ float yOffset = 20f; float margin = 3f; - Draw.color(0f, 0f, 0f, 0.2f); + Draw.color(0f, 0f, 0f, 0.2f * this.color.a); Fill.rect(x, y + yOffset - l.height/2f, l.width + margin, l.height + margin); - Draw.color(); font.setColor(color); font.draw(text, x - l.width/2f, y + yOffset, 90f, Align.left, true); font.setUseIntegerPositions(ints);