Added "favorites" and "last played" beatmap groups, and more sorts.
- New sorts: by date added, and most played. - Sorts are moved to a dropdown menu. - Tabs are now groupings (all songs, last played, favorites). - Add/remove "favorite" beatmaps in the right-click menu. - Beatmap database is now updateable like score database (no longer drops/recreates on every update). - Various bug fixes. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -68,6 +68,18 @@ public class Beatmap implements Comparable<Beatmap> {
|
||||
/** The star rating. */
|
||||
public double starRating = -1;
|
||||
|
||||
/** The timestamp this beatmap was first loaded. */
|
||||
public long dateAdded = 0;
|
||||
|
||||
/** Whether this beatmap is marked as a "favorite". */
|
||||
public boolean favorite = false;
|
||||
|
||||
/** Total number of times this beatmap has been played. */
|
||||
public int playCount = 0;
|
||||
|
||||
/** The last time this beatmap was played (timestamp). */
|
||||
public long lastPlayed = 0;
|
||||
|
||||
/**
|
||||
* [General]
|
||||
*/
|
||||
@@ -501,4 +513,12 @@ public class Beatmap implements Comparable<Beatmap> {
|
||||
String[] rgb = s.split(",");
|
||||
this.sliderBorder = new Color(new Color(Integer.parseInt(rgb[0]), Integer.parseInt(rgb[1]), Integer.parseInt(rgb[2])));
|
||||
}
|
||||
|
||||
/**
|
||||
* Increments the play counter and last played time.
|
||||
*/
|
||||
public void incrementPlayCounter() {
|
||||
this.playCount++;
|
||||
this.lastPlayed = System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user