better music selection alignment (progress)
This commit is contained in:
parent
8d8ef15ce4
commit
67684e8634
@ -38,8 +38,8 @@ public class BasicVisualizer extends VisualizerCore {
|
||||
pixmap = new Pixmap(2, 2, Format.RGBA8888);
|
||||
pixmap.setColor(Color.WHITE);
|
||||
pixmap.fill();
|
||||
barCount = 65;
|
||||
smoothRange = 3;
|
||||
barCount = 50;
|
||||
smoothRange = 2;
|
||||
angleRot = new Vector2(MathUtils.cosDeg(rotation), MathUtils.sinDeg(rotation));
|
||||
textures = new Texture[barCount];
|
||||
bars = new Sprite[barCount];
|
||||
|
@ -19,7 +19,7 @@ public class MusicSelectable extends WidgetGroup implements Disposable {
|
||||
private Table table;
|
||||
|
||||
private Image imageIcon;
|
||||
private ScrollText displayName;
|
||||
private Label displayName;
|
||||
private Label durationLabel;
|
||||
private Label authorLabel;
|
||||
|
||||
@ -31,6 +31,7 @@ public class MusicSelectable extends WidgetGroup implements Disposable {
|
||||
private boolean selected;
|
||||
|
||||
private VerticalGroup vGroup;
|
||||
|
||||
public MusicSelectable(FileHandle musicFile, Preferences musicAnnotation, Skin skin, Texture defaultAlbumC) {
|
||||
table = new Table(skin);
|
||||
table.setBackground("holo-pane");
|
||||
@ -44,9 +45,9 @@ public class MusicSelectable extends WidgetGroup implements Disposable {
|
||||
songInfo = new SongInfo(musicFile, musicAnnotation);
|
||||
|
||||
imageIcon = new Image(albumCover);
|
||||
table.add(imageIcon).fill();
|
||||
table.add(imageIcon).size(180f).left().expandX();
|
||||
|
||||
displayName = new ScrollText(musicFile.nameWithoutExtension().replace('_', ' '), null, skin, true, false);
|
||||
displayName = new Label(musicFile.nameWithoutExtension().replace('_', ' '), skin, "sub-font", skin.getColor("default"));
|
||||
vGroup.addActor(displayName);
|
||||
|
||||
durationLabel = new Label("Loading...", skin, "sub-font", skin.getColor("default"));
|
||||
@ -55,6 +56,7 @@ public class MusicSelectable extends WidgetGroup implements Disposable {
|
||||
authorLabel = new Label("Loading...", skin, "sub-font", skin.getColor("default"));
|
||||
vGroup.addActor(authorLabel);
|
||||
|
||||
table.add(vGroup).center();
|
||||
|
||||
addActor(table);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user