mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-28 07:22:21 -08:00
Misc UI fixes
This commit is contained in:
parent
1b6c0c7717
commit
017fbeb4e9
5 changed files with 9 additions and 9 deletions
|
|
@ -1437,7 +1437,7 @@ rules.unitcapvariable = Cores Contribute To Unit Cap
|
|||
rules.unitpayloadsexplode = Carried Payloads Explode With The Unit
|
||||
rules.unitcap = Base Unit Cap
|
||||
rules.limitarea = Limit Map Area
|
||||
rules.enemycorebuildradius = Enemy Core No-Build Radius:[lightgray] (tiles)
|
||||
rules.enemycorebuildradius = Core No-Build Radius:[lightgray] (tiles)
|
||||
rules.extracorebuildradius = Extra No-Build Radius:[lightgray] (tiles)
|
||||
rules.wavespacing = Wave Spacing:[lightgray] (sec)
|
||||
rules.initialwavespacing = Initial Wave Spacing:[lightgray] (sec)
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -168,7 +168,7 @@ public class MinimapRenderer{
|
|||
if(fullView && net.active()){
|
||||
for(Player player : Groups.player){
|
||||
if(!player.dead()){
|
||||
drawLabel(player.x, player.y, player.name, player.color);
|
||||
drawLabel(player.x, player.y, player.name, player.color, scaleFactor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -373,22 +373,22 @@ public class MinimapRenderer{
|
|||
return color.rgba();
|
||||
}
|
||||
|
||||
public void drawLabel(float x, float y, String text, Color color){
|
||||
public void drawLabel(float x, float y, String text, Color color, float scaleFactor){
|
||||
Font font = Fonts.outline;
|
||||
GlyphLayout l = Pools.obtain(GlyphLayout.class, GlyphLayout::new);
|
||||
boolean ints = font.usesIntegerPositions();
|
||||
font.getData().setScale(1 / 1.5f / Scl.scl(1f));
|
||||
font.getData().setScale(1 / 1.25f / Scl.scl(1f) * scaleFactor * 1f);
|
||||
font.setUseIntegerPositions(false);
|
||||
|
||||
l.setText(font, text, color, 90f, Align.left, true);
|
||||
l.setText(font, text, color, 90f * scaleFactor, Align.left, false);
|
||||
float yOffset = 20f;
|
||||
float margin = 3f;
|
||||
float margin = 3f * scaleFactor;
|
||||
|
||||
Draw.color(0f, 0f, 0f, 0.2f);
|
||||
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.draw(text, x - l.width/2f, y + yOffset, 90f * scaleFactor, Align.left, false);
|
||||
font.setUseIntegerPositions(ints);
|
||||
|
||||
font.getData().setScale(1f);
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||
|
||||
public void ruleInfo(Cell<?> cell, String text){
|
||||
if(Core.bundle.has(text.substring(1) + ".info")){
|
||||
if(mobile){
|
||||
if(mobile && !graphics.isPortrait()){ //disabled in portrait - broken and goes offscreen
|
||||
Table table = new Table();
|
||||
table.add(cell.get()).left().expandX().fillX();
|
||||
cell.clearElement();
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ public class ModsDialog extends BaseDialog{
|
|||
|
||||
void setup(){
|
||||
float h = 110f;
|
||||
float w = Math.min(Core.graphics.getWidth() / Scl.scl(1.05f), 520f);
|
||||
float w = Math.min(Core.graphics.getWidth() / Scl.scl(1.05f) - Scl.scl(28f), 520f);
|
||||
|
||||
cont.clear();
|
||||
cont.defaults().width(Math.min(Core.graphics.getWidth() / Scl.scl(1.05f), 556f)).pad(4);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue