Misc UI fixes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user