This commit is contained in:
Anuken
2021-10-12 08:25:00 -04:00
parent da0fea5186
commit d5f7fc842c
3 changed files with 8 additions and 5 deletions

View File

@@ -138,8 +138,10 @@ public class Bar extends Element{
GlyphLayout lay = Pools.obtain(GlyphLayout.class, GlyphLayout::new); GlyphLayout lay = Pools.obtain(GlyphLayout.class, GlyphLayout::new);
lay.setText(font, name); lay.setText(font, name);
font.setColor(1f, 1f, 1f, parentAlpha); font.setColor(1f, 1f, 1f, 1f);
font.draw(name, x + width / 2f - lay.width / 2f, y + height / 2f + lay.height / 2f + 1); font.getCache().clear();
font.getCache().addText(name, x + width / 2f - lay.width / 2f, y + height / 2f + lay.height / 2f + 1);
font.getCache().draw(parentAlpha);
Pools.free(lay); Pools.free(lay);
} }

View File

@@ -37,6 +37,7 @@ public class Minimap extends Table{
Draw.rect(renderer.minimap.getRegion(), x + width / 2f, y + height / 2f, width, height); Draw.rect(renderer.minimap.getRegion(), x + width / 2f, y + height / 2f, width, height);
if(renderer.minimap.getTexture() != null){ if(renderer.minimap.getTexture() != null){
Draw.alpha(parentAlpha);
renderer.minimap.drawEntities(x, y, width, height, 0.75f, false); renderer.minimap.drawEntities(x, y, width, height, 0.75f, false);
} }

View File

@@ -667,7 +667,7 @@ public class HudFragment extends Fragment{
float stroke = width * 0.35f; float stroke = width * 0.35f;
float bh = height/2f; float bh = height/2f;
Draw.color(color); Draw.color(color, parentAlpha);
float f1 = Math.min(fract * 2f, 1f), f2 = (fract - 0.5f) * 2f; float f1 = Math.min(fract * 2f, 1f), f2 = (fract - 0.5f) * 2f;
@@ -703,10 +703,10 @@ public class HudFragment extends Fragment{
new Element(){ new Element(){
@Override @Override
public void draw(){ public void draw(){
Draw.color(Pal.darkerGray); Draw.color(Pal.darkerGray, parentAlpha);
Fill.poly(x + width/2f, y + height/2f, 6, height / Mathf.sqrt3); Fill.poly(x + width/2f, y + height/2f, 6, height / Mathf.sqrt3);
Draw.reset(); Draw.reset();
Drawf.shadow(x + width/2f, y + height/2f, height * 1.13f); Drawf.shadow(x + width/2f, y + height/2f, height * 1.13f, parentAlpha);
} }
}, },
new Table(t -> { new Table(t -> {