Eliminated unneeded calls to Graphics.setColor().

The method creates a new Color object each call, so set color in UnicodeFont.drawString() instead.

Also slightly padded the song information text.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-01-16 14:46:45 -05:00
parent 816c9bb659
commit be1ec64f28
5 changed files with 33 additions and 35 deletions

View File

@@ -118,11 +118,10 @@ public class GameRanking extends BasicGameState {
}
// header text
g.setColor(Color.white);
Utils.FONT_LARGE.drawString(10, 0,
String.format("%s - %s [%s]", osu.getArtist(), osu.getTitle(), osu.version));
String.format("%s - %s [%s]", osu.getArtist(), osu.getTitle(), osu.version), Color.white);
Utils.FONT_MEDIUM.drawString(10, Utils.FONT_LARGE.getLineHeight() - 6,
String.format("Beatmap by %s", osu.creator));
String.format("Beatmap by %s", osu.creator), Color.white);
// buttons
retryButton.draw();