Color unplayed beatmaps pink in the menu.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
0d92d79ed7
commit
e3276a3365
|
@ -208,4 +208,15 @@ public class BeatmapSet implements Iterable<Beatmap> {
|
||||||
BeatmapDB.updateFavoriteStatus(map);
|
BeatmapDB.updateFavoriteStatus(map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether any beatmap in this set has been played.
|
||||||
|
*/
|
||||||
|
public boolean isPlayed() {
|
||||||
|
for (Beatmap map : beatmaps) {
|
||||||
|
if (map.playCount > 0)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class BeatmapSetNode {
|
||||||
public void draw(float x, float y, Grade grade, boolean focus) {
|
public void draw(float x, float y, Grade grade, boolean focus) {
|
||||||
Image bg = GameImage.MENU_BUTTON_BG.getImage();
|
Image bg = GameImage.MENU_BUTTON_BG.getImage();
|
||||||
boolean expanded = (beatmapIndex > -1);
|
boolean expanded = (beatmapIndex > -1);
|
||||||
Beatmap beatmap;
|
Beatmap beatmap = beatmapSet.get(expanded ? beatmapIndex : 0);
|
||||||
bg.setAlpha(0.9f);
|
bg.setAlpha(0.9f);
|
||||||
Color bgColor;
|
Color bgColor;
|
||||||
Color textColor = Options.getSkin().getSongSelectInactiveTextColor();
|
Color textColor = Options.getSkin().getSongSelectInactiveTextColor();
|
||||||
|
@ -88,11 +88,10 @@ public class BeatmapSetNode {
|
||||||
textColor = Options.getSkin().getSongSelectActiveTextColor();
|
textColor = Options.getSkin().getSongSelectActiveTextColor();
|
||||||
} else
|
} else
|
||||||
bgColor = Colors.BLUE_BUTTON;
|
bgColor = Colors.BLUE_BUTTON;
|
||||||
beatmap = beatmapSet.get(beatmapIndex);
|
} else if (beatmapSet.isPlayed())
|
||||||
} else {
|
|
||||||
bgColor = Colors.ORANGE_BUTTON;
|
bgColor = Colors.ORANGE_BUTTON;
|
||||||
beatmap = beatmapSet.get(0);
|
else
|
||||||
}
|
bgColor = Colors.PINK_BUTTON;
|
||||||
bg.draw(x, y, bgColor);
|
bg.draw(x, y, bgColor);
|
||||||
|
|
||||||
float cx = x + (bg.getWidth() * 0.043f);
|
float cx = x + (bg.getWidth() * 0.043f);
|
||||||
|
|
|
@ -943,7 +943,7 @@ public class SongMenu extends BasicGameState {
|
||||||
focusScores = null;
|
focusScores = null;
|
||||||
search.setText("");
|
search.setText("");
|
||||||
searchTimer = SEARCH_DELAY;
|
searchTimer = SEARCH_DELAY;
|
||||||
searchTransitionTimer = 0;
|
searchTransitionTimer = SEARCH_TRANSITION_TIME;
|
||||||
searchResultString = null;
|
searchResultString = null;
|
||||||
BeatmapSetList.get().reset();
|
BeatmapSetList.get().reset();
|
||||||
BeatmapSetList.get().init();
|
BeatmapSetList.get().init();
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class Colors {
|
||||||
BLUE_BACKGROUND = new Color(74, 130, 255),
|
BLUE_BACKGROUND = new Color(74, 130, 255),
|
||||||
BLUE_BUTTON = new Color(40, 129, 237),
|
BLUE_BUTTON = new Color(40, 129, 237),
|
||||||
ORANGE_BUTTON = new Color(200, 90, 3),
|
ORANGE_BUTTON = new Color(200, 90, 3),
|
||||||
|
PINK_BUTTON = new Color(223, 71, 147),
|
||||||
YELLOW_ALPHA = new Color(255, 255, 0, 0.4f),
|
YELLOW_ALPHA = new Color(255, 255, 0, 0.4f),
|
||||||
WHITE_FADE = new Color(255, 255, 255, 1f),
|
WHITE_FADE = new Color(255, 255, 255, 1f),
|
||||||
RED_HOVER = new Color(255, 112, 112),
|
RED_HOVER = new Color(255, 112, 112),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user