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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user