Preload game images directly before a game. (undo 95775d8)

Not noticing any bad effects from this anymore.  The application should load faster again.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han 2015-03-06 14:39:49 -05:00
parent 7fb326d870
commit 6cd6938ea5
2 changed files with 6 additions and 4 deletions

View File

@ -135,7 +135,7 @@ public enum GameImage {
SPINNER_SPIN ("spinner-spin", "png"),
SPINNER_CLEAR ("spinner-clear", "png"),
SPINNER_OSU ("spinner-osu", "png"),
SPINNER_RPM ("spinner-rpm", "png", false, true) {
SPINNER_RPM ("spinner-rpm", "png") {
@Override
protected Image process_sub(Image img, int w, int h) {
return img.getScaledCopy((SCORE_0.getImage().getHeight() * 1.05f) / img.getHeight());
@ -581,7 +581,7 @@ public enum GameImage {
* @param type the file types (separated by '|')
*/
GameImage(String filename, String type) {
this(filename, type, true, true);
this(filename, type, true, false);
}
/**
@ -591,7 +591,7 @@ public enum GameImage {
* @param type the file types (separated by '|')
*/
GameImage(String filename, String filenameFormat, String type) {
this(filename, type, true, true);
this(filename, type, true, false);
this.filenameFormat = filenameFormat;
}

View File

@ -839,8 +839,10 @@ public class Game extends BasicGameState {
// set images
File parent = osu.getFile().getParentFile();
for (GameImage img : GameImage.values()) {
if (img.isSkinnable())
if (img.isSkinnable()) {
img.setDefaultImage();
img.setSkinImage(parent);
}
}
// skip button