Circular visualizer now has function organized circle vertice order; sorting comparator moved to local method;
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package zero1hd.rhythmbullet.desktop.audio;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.Observable;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
@@ -10,18 +11,15 @@ import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.Sort;
|
||||
|
||||
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||
import zero1hd.rhythmbullet.util.FileHandleAlphabeticalComparator;
|
||||
|
||||
public class MusicList extends Observable {
|
||||
private Array<FileHandle> musicArray;
|
||||
private String searchPath;
|
||||
private boolean searched;
|
||||
private FileHandleAlphabeticalComparator fhac;
|
||||
private ExecutorService exec;
|
||||
|
||||
public MusicList() {
|
||||
musicArray = new Array<>();
|
||||
fhac = new FileHandleAlphabeticalComparator();
|
||||
exec = Executors.newSingleThreadExecutor();
|
||||
}
|
||||
|
||||
@@ -56,7 +54,13 @@ public class MusicList extends Observable {
|
||||
}
|
||||
musicArray.add(Gdx.files.external("RhythmBullet/Alan Walker - Spectre.mp3"));
|
||||
setChanged();
|
||||
Sort.instance().sort(musicArray, fhac);
|
||||
Sort.instance().sort(musicArray, new Comparator<FileHandle>() {
|
||||
@Override
|
||||
public int compare(FileHandle o1, FileHandle o2) {
|
||||
return o1.nameWithoutExtension().compareTo(o2.nameWithoutExtension());
|
||||
}
|
||||
});
|
||||
|
||||
searched = true;
|
||||
|
||||
if (notifyOnCompletion) {
|
||||
|
@@ -36,14 +36,14 @@ public class SplashScreen extends ScreenAdapter implements AdvancedResizeScreen
|
||||
stage.act(delta);
|
||||
|
||||
if (!zero1HD.hasActions() && core.isInitComplete()) {
|
||||
moveOn();
|
||||
attemptMoveOn();
|
||||
}
|
||||
|
||||
stage.draw();
|
||||
super.render(delta);
|
||||
}
|
||||
|
||||
private void moveOn() {
|
||||
private void attemptMoveOn() {
|
||||
if (!done) {
|
||||
Gdx.app.debug("Loading Screen", "queue has all been loaded. Action is done playing.");
|
||||
done = true;
|
||||
|
Reference in New Issue
Block a user