it is done

This commit is contained in:
Anuken
2019-12-25 01:39:38 -05:00
parent 5b21873f3c
commit 514d4817c8
488 changed files with 4572 additions and 4574 deletions

View File

@@ -0,0 +1,34 @@
package mindustry.ui;
import arc.graphics.g2d.*;
import arc.scene.ui.*;
import arc.scene.ui.layout.*;
import mindustry.type.*;
public class ItemImage extends Stack{
public ItemImage(TextureRegion region, int amount){
Table t = new Table().left().bottom();
t.add(amount + "").name("item-label");
add(new Image(region));
add(t);
}
public ItemImage(TextureRegion region){
Table t = new Table().left().bottom();
add(new Image(region));
add(t);
}
public ItemImage(ItemStack stack){
add(new Image(stack.item.icon(Cicon.medium)));
if(stack.amount != 0){
Table t = new Table().left().bottom();
t.add(stack.amount + "").name("item-label");
add(t);
}
}
}