mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
Remove labels from minimap, keep on larger map
This commit is contained in:
parent
23b7176d5a
commit
243862804a
@ -72,7 +72,7 @@ public class MinimapRenderer implements Disposable{
|
||||
region = new TextureRegion(texture);
|
||||
}
|
||||
|
||||
public void drawEntities(float x, float y, float w, float h){
|
||||
public void drawEntities(float x, float y, float w, float h, boolean withLabels){
|
||||
updateUnitArray();
|
||||
|
||||
float sz = baseSize * zoom;
|
||||
@ -87,7 +87,7 @@ public class MinimapRenderer implements Disposable{
|
||||
float rx = (unit.x - rect.x) / rect.width * w, ry = (unit.y - rect.y) / rect.width * h;
|
||||
Draw.color(unit.getTeam().color);
|
||||
|
||||
if (unit.getTypeID() == TypeIDs.player) {
|
||||
if (withLabels && unit instanceof Player) {
|
||||
Player pl = (Player) unit;
|
||||
if (!pl.isLocal) {
|
||||
// Only display names for other players.
|
||||
@ -101,6 +101,10 @@ public class MinimapRenderer implements Disposable{
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
public void drawEntities(float x, float y, float w, float h){
|
||||
drawEntities(x, y, w, h, true);
|
||||
}
|
||||
|
||||
public TextureRegion getRegion(){
|
||||
if(texture == null) return null;
|
||||
|
||||
|
@ -36,7 +36,7 @@ public class Minimap extends Table{
|
||||
Draw.rect(renderer.minimap.getRegion(), x + width / 2f, y + height / 2f, width, height);
|
||||
|
||||
if(renderer.minimap.getTexture() != null){
|
||||
renderer.minimap.drawEntities(x, y, width, height);
|
||||
renderer.minimap.drawEntities(x, y, width, height, false);
|
||||
}
|
||||
}
|
||||
}).size(140f);
|
||||
|
Loading…
Reference in New Issue
Block a user