Minor graphical changes.

- Added a simple color change when hovering over an option in the options menu.
- Draw part of the song button before the start node, if any, for a more complete-looking scroll animation.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-02-19 02:43:26 -05:00
parent 25a7a826f1
commit ab1a377be0
3 changed files with 41 additions and 20 deletions

View File

@@ -329,12 +329,17 @@ public class SongMenu extends BasicGameState {
// song buttons
OsuGroupNode node = startNode;
for (int i = 0; i < MAX_SONG_BUTTONS && node != null; i++, node = node.next) {
int songButtonIndex = 0;
if (node != null && node.prev != null) {
node = node.prev;
songButtonIndex = -1;
}
for (int i = songButtonIndex; i <= MAX_SONG_BUTTONS && node != null; i++, node = node.next) {
// draw the node
float offset = (i == hoverIndex) ? hoverOffset : 0f;
ScoreData[] scores = getScoreDataForNode(node, false);
node.draw(
buttonX - offset, buttonY + (i*buttonOffset),
buttonX - offset, buttonY + (i*buttonOffset) + DIVIDER_LINE_WIDTH / 2,
headerY + DIVIDER_LINE_WIDTH / 2, footerY - DIVIDER_LINE_WIDTH,
(scores == null) ? Grade.NULL : scores[0].getGrade(),
(node == focusNode)