Misc UI fixes
This commit is contained in:
@@ -1437,7 +1437,7 @@ rules.unitcapvariable = Cores Contribute To Unit Cap
|
|||||||
rules.unitpayloadsexplode = Carried Payloads Explode With The Unit
|
rules.unitpayloadsexplode = Carried Payloads Explode With The Unit
|
||||||
rules.unitcap = Base Unit Cap
|
rules.unitcap = Base Unit Cap
|
||||||
rules.limitarea = Limit Map Area
|
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.extracorebuildradius = Extra No-Build Radius:[lightgray] (tiles)
|
||||||
rules.wavespacing = Wave Spacing:[lightgray] (sec)
|
rules.wavespacing = Wave Spacing:[lightgray] (sec)
|
||||||
rules.initialwavespacing = Initial 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()){
|
if(fullView && net.active()){
|
||||||
for(Player player : Groups.player){
|
for(Player player : Groups.player){
|
||||||
if(!player.dead()){
|
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();
|
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;
|
Font font = Fonts.outline;
|
||||||
GlyphLayout l = Pools.obtain(GlyphLayout.class, GlyphLayout::new);
|
GlyphLayout l = Pools.obtain(GlyphLayout.class, GlyphLayout::new);
|
||||||
boolean ints = font.usesIntegerPositions();
|
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);
|
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 yOffset = 20f;
|
||||||
float margin = 3f;
|
float margin = 3f * scaleFactor;
|
||||||
|
|
||||||
Draw.color(0f, 0f, 0f, 0.2f);
|
Draw.color(0f, 0f, 0f, 0.2f);
|
||||||
Fill.rect(x, y + yOffset - l.height/2f, l.width + margin, l.height + margin);
|
Fill.rect(x, y + yOffset - l.height/2f, l.width + margin, l.height + margin);
|
||||||
Draw.color();
|
Draw.color();
|
||||||
font.setColor(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.setUseIntegerPositions(ints);
|
||||||
|
|
||||||
font.getData().setScale(1f);
|
font.getData().setScale(1f);
|
||||||
|
|||||||
@@ -432,7 +432,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
|
|
||||||
public void ruleInfo(Cell<?> cell, String text){
|
public void ruleInfo(Cell<?> cell, String text){
|
||||||
if(Core.bundle.has(text.substring(1) + ".info")){
|
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 table = new Table();
|
||||||
table.add(cell.get()).left().expandX().fillX();
|
table.add(cell.get()).left().expandX().fillX();
|
||||||
cell.clearElement();
|
cell.clearElement();
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
|
|
||||||
void setup(){
|
void setup(){
|
||||||
float h = 110f;
|
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.clear();
|
||||||
cont.defaults().width(Math.min(Core.graphics.getWidth() / Scl.scl(1.05f), 556f)).pad(4);
|
cont.defaults().width(Math.min(Core.graphics.getWidth() / Scl.scl(1.05f), 556f)).pad(4);
|
||||||
|
|||||||
Reference in New Issue
Block a user