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:
Jeffrey Han
2016-12-22 05:26:09 -05:00
parent 4446487575
commit ed06a8b0ac
12 changed files with 601 additions and 133 deletions

View File

@@ -95,6 +95,9 @@ public class DropdownMenu<E> extends AbstractComponent {
/** The chevron images. */
private Image chevronDown, chevronRight;
/** Should the next click be blocked? */
private boolean blockClick = false;
/**
* Creates a new dropdown menu.
* @param container the container rendering this menu
@@ -327,6 +330,7 @@ public class DropdownMenu<E> extends AbstractComponent {
this.expanded = false;
this.lastUpdateTime = 0;
expandProgress.setTime(0);
blockClick = false;
}
@Override
@@ -349,9 +353,21 @@ public class DropdownMenu<E> extends AbstractComponent {
this.itemIndex = idx;
itemSelected(idx, items[idx]);
}
blockClick = true;
consumeEvent();
}
@Override
public void mouseClicked(int button, int x, int y, int clickCount) {
if (!active)
return;
if (blockClick) {
blockClick = false;
consumeEvent();
}
}
/**
* Notification that a new item was selected (via override).
* @param index the index of the item selected