diff --git a/src/itdelatrisu/opsu/states/MainMenu.java b/src/itdelatrisu/opsu/states/MainMenu.java index 5db6ae3b..d187e9b6 100644 --- a/src/itdelatrisu/opsu/states/MainMenu.java +++ b/src/itdelatrisu/opsu/states/MainMenu.java @@ -262,7 +262,7 @@ public class MainMenu extends BasicGameState { // move back to original location if (logo.getX() < container.getWidth() / 2) { - logo.setX(logo.getX() + (delta / 2f)); + logo.setX(logo.getX() + (delta / 3f)); if (logo.getX() > container.getWidth() / 2) logo.setX(container.getWidth() / 2); } diff --git a/src/itdelatrisu/opsu/states/MainMenuExit.java b/src/itdelatrisu/opsu/states/MainMenuExit.java index a677999e..858505d6 100644 --- a/src/itdelatrisu/opsu/states/MainMenuExit.java +++ b/src/itdelatrisu/opsu/states/MainMenuExit.java @@ -69,7 +69,7 @@ public class MainMenuExit extends BasicGameState { int width = container.getWidth(); int height = container.getHeight(); - centerOffset = width / 8f; + centerOffset = width / 18f; // initialize buttons Image button = new Image("button-middle.png"); @@ -77,10 +77,10 @@ public class MainMenuExit extends BasicGameState { Image buttonR = new Image("button-right.png"); button = button.getScaledCopy(width / 2, button.getHeight()); yesButton = new GUIMenuButton(button, buttonL, buttonR, - width / 2f - centerOffset, height * 0.2f + width / 2f + centerOffset, height * 0.2f ); noButton = new GUIMenuButton(button, buttonL, buttonR, - width / 2f + centerOffset, height * 0.2f + (button.getHeight() * 1.25f) + width / 2f - centerOffset, height * 0.2f + (button.getHeight() * 1.25f) ); } @@ -120,9 +120,9 @@ public class MainMenuExit extends BasicGameState { float yesX = yesButton.getX(), noX = noButton.getX(); float center = container.getWidth() / 2f; if (yesX < center) - yesButton.setX(Math.min(yesX + (delta / 2f), center)); + yesButton.setX(Math.min(yesX + (delta / 6f), center)); if (noX > center) - noButton.setX(Math.max(noX - (delta / 2f), center)); + noButton.setX(Math.max(noX - (delta / 6f), center)); } @Override diff --git a/src/itdelatrisu/opsu/states/Options.java b/src/itdelatrisu/opsu/states/Options.java index da11cbfa..1fa83dce 100644 --- a/src/itdelatrisu/opsu/states/Options.java +++ b/src/itdelatrisu/opsu/states/Options.java @@ -359,9 +359,9 @@ public class Options extends BasicGameState { fixedAR = 0f, fixedOD = 0f; /** - * Whether or not to render loading text in the splash screen. + * Whether or not to display the files being loaded in the splash screen. */ - private static boolean loadVerbose = true; + private static boolean loadVerbose = false; /** * Track checkpoint time, in seconds. @@ -800,9 +800,9 @@ public class Options extends BasicGameState { ); break; case LOAD_VERBOSE: - drawOption(pos, "Display Loading Text", + drawOption(pos, "Show Detailed Loading Progress", loadVerbose ? "Yes" : "No", - "Display loading progress in the splash screen." + "Display more specific loading information in the splash screen." ); break; case MUSIC_VOLUME: diff --git a/src/itdelatrisu/opsu/states/Splash.java b/src/itdelatrisu/opsu/states/Splash.java index 8f228019..afa86b9f 100644 --- a/src/itdelatrisu/opsu/states/Splash.java +++ b/src/itdelatrisu/opsu/states/Splash.java @@ -81,26 +81,24 @@ public class Splash extends BasicGameState { logo.drawCentered(container.getWidth() / 2, container.getHeight() / 2); // display progress - if (Options.isLoadVerbose()) { - String unpackedFile = OszUnpacker.getCurrentFileName(); - String parsedFile = OsuParser.getCurrentFileName(); - String soundFile = SoundController.getCurrentFileName(); - if (unpackedFile != null) { - drawLoadProgress( - String.format("Unpacking new beatmaps... (%d%%)", OszUnpacker.getUnpackerProgress()), - unpackedFile - ); - } else if (parsedFile != null) { - drawLoadProgress( - String.format("Loading beatmaps... (%d%%)", OsuParser.getParserProgress()), - parsedFile - ); - } else if (soundFile != null) { - drawLoadProgress( - String.format("Loading sounds... (%d%%)", SoundController.getLoadingProgress()), - soundFile - ); - } + String unpackedFile = OszUnpacker.getCurrentFileName(); + String parsedFile = OsuParser.getCurrentFileName(); + String soundFile = SoundController.getCurrentFileName(); + if (unpackedFile != null) { + drawLoadProgress( + g, OszUnpacker.getUnpackerProgress(), + "Unpacking new beatmaps...", unpackedFile + ); + } else if (parsedFile != null) { + drawLoadProgress( + g, OsuParser.getParserProgress(), + "Loading beatmaps...", parsedFile + ); + } else if (soundFile != null) { + drawLoadProgress( + g, SoundController.getLoadingProgress(), + "Loading sounds...", soundFile + ); } } @@ -161,13 +159,23 @@ public class Splash extends BasicGameState { /** * Draws loading progress. - * @param progress the progress text + * @param g the graphics context + * @param progress the completion percentage + * @param text the progress text * @param file the file being loaded */ - private void drawLoadProgress(String progress, String file) { + private void drawLoadProgress(Graphics g, int progress, String text, String file) { + g.setColor(Color.white); + g.setFont(Utils.FONT_MEDIUM); int lineY = container.getHeight() - 25; int lineOffsetY = Utils.FONT_MEDIUM.getLineHeight(); - Utils.FONT_MEDIUM.drawString(25, lineY - (lineOffsetY * 2), progress, Color.white); - Utils.FONT_MEDIUM.drawString(25, lineY - lineOffsetY, file, Color.white); + + if (Options.isLoadVerbose()) { + g.drawString(String.format("%s (%d%%)", text, progress), 25, lineY - (lineOffsetY * 2)); + g.drawString(file, 25, lineY - lineOffsetY); + } else { + g.drawString(text, 25, lineY - (lineOffsetY * 2)); + g.fillRect(25, lineY - (lineOffsetY / 2f), (container.getWidth() - 50) * progress / 100f, lineOffsetY / 4f); + } } }