From 67684e863454dbd6df430812b39c15ff941a713c Mon Sep 17 00:00:00 2001 From: Recrown Date: Sat, 28 Oct 2017 23:02:55 -0500 Subject: [PATCH] better music selection alignment (progress) --- .../rhythmbullet/audio/visualizer/BasicVisualizer.java | 4 ++-- .../graphics/ui/components/MusicSelectable.java | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java b/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java index 5d88e4d..46c5d52 100755 --- a/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java +++ b/core/src/zero1hd/rhythmbullet/audio/visualizer/BasicVisualizer.java @@ -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]; diff --git a/core/src/zero1hd/rhythmbullet/graphics/ui/components/MusicSelectable.java b/core/src/zero1hd/rhythmbullet/graphics/ui/components/MusicSelectable.java index f2e54a9..46187bd 100755 --- a/core/src/zero1hd/rhythmbullet/graphics/ui/components/MusicSelectable.java +++ b/core/src/zero1hd/rhythmbullet/graphics/ui/components/MusicSelectable.java @@ -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); }