Make CoreItemsDisplay not show up if nothing to show (#5263)

This commit is contained in:
Leonid Skorospelov 2021-05-17 18:10:05 +00:00 committed by GitHub
parent b11b087d53
commit 760962c2b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,12 +19,15 @@ public class CoreItemsDisplay extends Table{
public void resetUsed(){
usedItems.clear();
background(null);
}
void rebuild(){
clear();
background(Styles.black6);
margin(4);
if(usedItems.size > 0){
background(Styles.black6);
margin(4);
}
update(() -> {
core = Vars.player.team().core();