Optimizations / Very broken changes
This commit is contained in:
@@ -60,7 +60,9 @@ public class ContentDisplay{
|
||||
Array<StatValue> arr = map.get(stat);
|
||||
for(StatValue value : arr){
|
||||
value.display(inset);
|
||||
inset.add().size(10f);
|
||||
}
|
||||
|
||||
//map.get(stat).display(inset);
|
||||
}).fillX().padLeft(10);
|
||||
table.row();
|
||||
@@ -201,7 +203,7 @@ public class ContentDisplay{
|
||||
|
||||
table.add(Core.bundle.format("unit.health", unit.health));
|
||||
table.row();
|
||||
table.add(Core.bundle.format("unit.speed", Strings.toFixed(unit.speed, 1)));
|
||||
table.add(Core.bundle.format("unit.speed", Strings.fixed(unit.speed, 1)));
|
||||
table.row();
|
||||
table.row();
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class ItemDisplay extends Table{
|
||||
}
|
||||
|
||||
public ItemDisplay(Item item, int amount){
|
||||
add(new ItemImage(new ItemStack(item, amount))).size(8*3);
|
||||
add(new ItemImage(new ItemStack(item, amount))).size(8*4);
|
||||
add(item.localizedName()).padLeft(4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ItemImage extends Stack{
|
||||
}
|
||||
|
||||
public ItemImage(ItemStack stack){
|
||||
add(new Image(stack.item.icon(Icon.medium)));
|
||||
add(new Image(stack.item.icon(Icon.large)));
|
||||
|
||||
if(stack.amount != 0){
|
||||
Table t = new Table().left().bottom();
|
||||
|
||||
@@ -10,7 +10,7 @@ import io.anuke.mindustry.type.Liquid;
|
||||
public class LiquidDisplay extends Table{
|
||||
|
||||
public LiquidDisplay(Liquid liquid){
|
||||
add(new Image(liquid.getContentIcon())).size(8*3);
|
||||
add(new Image(liquid.getContentIcon())).size(8*4);
|
||||
add(liquid.localizedName()).padLeft(3);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class LiquidDisplay extends Table{
|
||||
|
||||
if(amount != 0){
|
||||
Table t = new Table().left().bottom();
|
||||
t.add(Strings.toFixed(amount, 2));
|
||||
t.add(Strings.autoFixed(amount));
|
||||
add(t);
|
||||
}
|
||||
}}).size(8*4);
|
||||
|
||||
@@ -187,9 +187,9 @@ public class BlockInventoryFragment extends Fragment{
|
||||
private String round(float f){
|
||||
f = (int) f;
|
||||
if(f >= 1000000){
|
||||
return Strings.toFixed(f / 1000000f, 1) + "[gray]mil[]";
|
||||
return Strings.fixed(f / 1000000f, 1) + "[gray]mil[]";
|
||||
}else if(f >= 1000){
|
||||
return Strings.toFixed(f / 1000, 1) + "k";
|
||||
return Strings.fixed(f / 1000, 1) + "k";
|
||||
}else{
|
||||
return (int) f + "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user