diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/MusicSelectable.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/MusicSelectable.java index 7218e69..1eafe95 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/MusicSelectable.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/MusicSelectable.java @@ -4,7 +4,6 @@ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.scenes.scene2d.InputEvent; -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.ui.WidgetGroup; @@ -18,8 +17,6 @@ public class MusicSelectable extends WidgetGroup implements Disposable { private Table table; private ShortenedTextLabel displayName; - private Label durationLabel; - private ShortenedTextLabel authorLabel; private boolean selected; @@ -40,12 +37,6 @@ public class MusicSelectable extends WidgetGroup implements Disposable { displayName = new ShortenedTextLabel(musicFile.nameWithoutExtension().replace('_', ' '), skin, "sub-font", skin.getColor("default")); table.add(displayName); - durationLabel = new Label("Loading...", skin, "sub-font", skin.getColor("default")); - table.add(durationLabel); - - authorLabel = new ShortenedTextLabel("Loading...", skin, "sub-font", skin.getColor("default")); - table.add(authorLabel); - table.pack(); addActor(table); addListener(new ClickListener() { @@ -66,22 +57,13 @@ public class MusicSelectable extends WidgetGroup implements Disposable { Gdx.app.debug("MusicSelectable", "Updating info for: " + getName()); this.musicInfo = musicInfo; displayName.setOriginalText(musicInfo.getMusicName()); - durationLabel.setText("Runtime: " - + ((musicInfo.getDurationInSeconds() / 60 < 1) ? "00" : musicInfo.getDurationInSeconds() / 60) + ":" - + ((musicInfo.getDurationInSeconds() - (musicInfo.getDurationInSeconds() / 60) * 60) < 10 - ? "0" + (musicInfo.getDurationInSeconds() - (musicInfo.getDurationInSeconds() / 60) * 60) - : (musicInfo.getDurationInSeconds() - (musicInfo.getDurationInSeconds() / 60) * 60))); - authorLabel.setOriginalText("Author: " + musicInfo.getAuthor()); - authorLabel.setToOriginalText(); } @Override public void layout() { - displayName.setTargetWidth((int) (getWidth()*0.43f)); - authorLabel.setTargetWidth((int) (getWidth()/3f)); + displayName.setTargetWidth((int) (getWidth()*0.8f)); displayName.resize(); - authorLabel.resize(); super.layout(); } diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java index d319561..12fe422 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java @@ -93,6 +93,10 @@ public class AnalysisPage extends Page { speedModifierSlider.setDisabled(false); healthModifierSlider.setDisabled(false); difficultyModifierSlider.setDisabled(false); + if (aa != null) { + aa.dispose(); + } + aa = new AudioAnalyzer(mm); aa.start(); }