Misc. cleanup of UI / Removed 'font scale' var / Removed [orange]

This commit is contained in:
Anuken
2018-11-06 23:47:23 -05:00
parent 837f621633
commit d4f5e854c5
37 changed files with 1186 additions and 1203 deletions
@@ -395,23 +395,28 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
public void drawName(){
GlyphLayout layout = Pooling.obtain(GlyphLayout.class, GlyphLayout::new);
Draw.tscl(0.25f / 2);
boolean ints = Core.font.usesIntegerPositions();
Core.font.setUseIntegerPositions(false);
Draw.tscl(0.25f / io.anuke.ucore.scene.ui.layout.Unit.dp.scl(1f));
layout.setText(Core.font, name);
Draw.color(0f, 0f, 0f, 0.3f);
Draw.rect("blank", x, y + 8 - layout.height / 2, layout.width + 2, layout.height + 2);
Draw.rect("blank", x, y + 8 - layout.height / 2, layout.width + 2, layout.height + 3);
Draw.color();
Draw.tcolor(color);
Draw.text(name, x, y + 8);
if(isAdmin){
Draw.color(color);
float s = 3f;
Draw.color(color.r * 0.5f, color.g * 0.5f, color.b * 0.5f, 1f);
Draw.rect("icon-admin-small", x + layout.width / 2f + 2 + 1, y + 6.5f, s, s);
Draw.color(color);
Draw.rect("icon-admin-small", x + layout.width / 2f + 2 + 1, y + 7f, s, s);
}
Draw.reset();
Pooling.free(layout);
Draw.tscl(fontScale);
Draw.tscl(1f);
Core.font.setUseIntegerPositions(ints);
}
/**Draw all current build requests. Does not draw the beam effect, only the positions.*/
@@ -2,7 +2,6 @@ package io.anuke.mindustry.entities.effect;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.IntSet;
import io.anuke.annotations.Annotations.Loc;
@@ -15,7 +14,6 @@ import io.anuke.mindustry.entities.traits.SyncTrait;
import io.anuke.mindustry.game.Team;
import io.anuke.mindustry.gen.Call;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.ucore.core.Effects.Effect;
import io.anuke.ucore.entities.EntityGroup;
import io.anuke.ucore.entities.impl.TimedEntity;
import io.anuke.ucore.entities.trait.DrawTrait;
@@ -29,7 +27,6 @@ import java.io.DataInput;
import java.io.DataOutput;
import static io.anuke.mindustry.Vars.bulletGroup;
import static io.anuke.mindustry.Vars.fontScale;
public class Lightning extends TimedEntity implements DrawTrait, SyncTrait, TimeTrait{
public static final float lifetime = 10f;