added detailed display on screen (untested)

This commit is contained in:
2018-08-03 21:41:18 -05:00
parent b857ffe4bd
commit a39f3a25ac
2 changed files with 42 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
import com.badlogic.gdx.utils.Array;
@@ -89,8 +90,12 @@ public class MusicSelectable extends Button {
public void loadAlbumCover() {
metadata.loadAlbumCover();
Texture texture = defaultAlbumArt;
if (metadata.getAlbumCover() != null) {
texture = metadata.getAlbumCover();
}
synchronized (album) {
album.setDrawable(new TextureRegionDrawable(new TextureRegion(metadata.getAlbumCover())));
album.setDrawable(new TextureRegionDrawable(new TextureRegion(texture)));
}
}