Added support for conditional search expressions.

- Pattern: {type}{operator}{value}
-- Types: ar, cs, od, hp, bpm (length not yet implemented)
-- Operators: =/==, >, >=, <, <=

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2014-07-17 12:49:12 -04:00
parent 0a5e7f66ec
commit 4ecd50f488
3 changed files with 122 additions and 17 deletions

View File

@@ -58,7 +58,7 @@ public class SongMenu extends BasicGameState {
/**
* Delay time, in milliseconds, between each search.
*/
private static final int SEARCH_DELAY = 300;
private static final int SEARCH_DELAY = 500;
/**
* Current start node (topmost menu entry).
@@ -314,7 +314,9 @@ public class SongMenu extends BasicGameState {
else
setFocus(Opsu.groups.getRandomNode(), -1, true);
} else {
searchResultString = String.format("%d matches found!", Opsu.groups.size());
int size = Opsu.groups.size();
searchResultString = String.format("%d match%s found!",
size, (size == 1) ? "" : "es");
setFocus(Opsu.groups.getRandomNode(), -1, true);
}
oldFocusNode = null;