Pathfinding stuck improvements

This commit is contained in:
Anuken
2022-02-17 12:12:30 -05:00
parent 61fea0337f
commit f9eabecd88
4 changed files with 12 additions and 25 deletions

View File

@@ -15,29 +15,19 @@ public class ItemImage extends Stack{
o.add(new Image(region)).size(32f);
}));
add(new Table(t -> {
t.left().bottom();
t.add(amount >= 1000 ? UI.formatAmount(amount) : amount + "").style(Styles.outlineLabel);
t.pack();
}));
}
public ItemImage(ItemStack stack){
add(new Table(o -> {
o.left();
o.add(new Image(stack.item.uiIcon)).size(32f);
}));
if(stack.amount != 0){
if(amount != 0){
add(new Table(t -> {
t.left().bottom();
t.add(stack.amount >= 1000 ? UI.formatAmount(stack.amount) : stack.amount + "").style(Styles.outlineLabel);
t.add(amount >= 1000 ? UI.formatAmount(amount) : amount + "").style(Styles.outlineLabel);
t.pack();
}));
}
}
public ItemImage(ItemStack stack){
this(stack.item.uiIcon, stack.amount);
}
public ItemImage(PayloadStack stack){
this(stack.item.uiIcon, stack.amount);
}