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 = new Pixmap(2, 2, Format.RGBA8888);
|
||||||
pixmap.setColor(Color.WHITE);
|
pixmap.setColor(Color.WHITE);
|
||||||
pixmap.fill();
|
pixmap.fill();
|
||||||
barCount = 65;
|
barCount = 50;
|
||||||
smoothRange = 3;
|
smoothRange = 2;
|
||||||
angleRot = new Vector2(MathUtils.cosDeg(rotation), MathUtils.sinDeg(rotation));
|
angleRot = new Vector2(MathUtils.cosDeg(rotation), MathUtils.sinDeg(rotation));
|
||||||
textures = new Texture[barCount];
|
textures = new Texture[barCount];
|
||||||
bars = new Sprite[barCount];
|
bars = new Sprite[barCount];
|
||||||
|
@ -19,7 +19,7 @@ public class MusicSelectable extends WidgetGroup implements Disposable {
|
|||||||
private Table table;
|
private Table table;
|
||||||
|
|
||||||
private Image imageIcon;
|
private Image imageIcon;
|
||||||
private ScrollText displayName;
|
private Label displayName;
|
||||||
private Label durationLabel;
|
private Label durationLabel;
|
||||||
private Label authorLabel;
|
private Label authorLabel;
|
||||||
|
|
||||||
@ -31,6 +31,7 @@ public class MusicSelectable extends WidgetGroup implements Disposable {
|
|||||||
private boolean selected;
|
private boolean selected;
|
||||||
|
|
||||||
private VerticalGroup vGroup;
|
private VerticalGroup vGroup;
|
||||||
|
|
||||||
public MusicSelectable(FileHandle musicFile, Preferences musicAnnotation, Skin skin, Texture defaultAlbumC) {
|
public MusicSelectable(FileHandle musicFile, Preferences musicAnnotation, Skin skin, Texture defaultAlbumC) {
|
||||||
table = new Table(skin);
|
table = new Table(skin);
|
||||||
table.setBackground("holo-pane");
|
table.setBackground("holo-pane");
|
||||||
@ -44,9 +45,9 @@ public class MusicSelectable extends WidgetGroup implements Disposable {
|
|||||||
songInfo = new SongInfo(musicFile, musicAnnotation);
|
songInfo = new SongInfo(musicFile, musicAnnotation);
|
||||||
|
|
||||||
imageIcon = new Image(albumCover);
|
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);
|
vGroup.addActor(displayName);
|
||||||
|
|
||||||
durationLabel = new Label("Loading...", skin, "sub-font", skin.getColor("default"));
|
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"));
|
authorLabel = new Label("Loading...", skin, "sub-font", skin.getColor("default"));
|
||||||
vGroup.addActor(authorLabel);
|
vGroup.addActor(authorLabel);
|
||||||
|
|
||||||
|
table.add(vGroup).center();
|
||||||
|
|
||||||
addActor(table);
|
addActor(table);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user