Skip to content

Commit

Permalink
fix, i dont know
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackDeluxeCat committed Mar 16, 2024
1 parent f2ab3d6 commit d0092b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/mi2u/graphics/RendererExt.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
16 changes: 8 additions & 8 deletions src/mi2u/ui/MinimapMindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 -> {
Expand All @@ -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
Expand Down Expand Up @@ -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){
Expand Down Expand Up @@ -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);
}

Expand All @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d0092b4

Please sign in to comment.