Follow-up to #49.

Allowed toggling HD image loading in-game; changed some names; other minor formatting changes.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-03-14 23:28:50 -04:00
parent 637f5dc8d4
commit f7c627e8a2
4 changed files with 57 additions and 70 deletions

View File

@@ -257,7 +257,7 @@ public class Options {
},
ENABLE_THEME_SONG ("Enable Theme Song", "Whether to play the theme song upon starting opsu!", true),
SHOW_HIT_ERROR_BAR ("Show Hit Error Bar", "Shows precisely how accurate you were with each hit.", false),
USE_2X_IMAGE ("Use @2x Images", "Uses @2x images if available.", true),
LOAD_HD_IMAGES ("Load HD Images", "Loads HD (@2x) images when available. Increases memory usage and loading times.", true),
DISABLE_MOUSE_WHEEL ("Disable mouse wheel in play mode", "During play, you can use the mouse wheel to adjust the volume and pause the game.\nThis will disable that functionality.", false),
DISABLE_MOUSE_BUTTONS ("Disable mouse buttons in play mode", "This option will disable all mouse buttons.\nSpecifically for people who use their keyboard to click.", false);
@@ -694,14 +694,12 @@ public class Options {
* @return true if enabled
*/
public static boolean isHitErrorBarEnabled() { return GameOption.SHOW_HIT_ERROR_BAR.getBooleanValue(); }
/**
* Returns whether or not to use 2x Images
* @return true if ignored
* Returns whether or not to load HD (@2x) images.
* @return true if HD images are enabled, false if only SD images should be loaded
*/
public static boolean is2xImagesEnabled() { return GameOption.USE_2X_IMAGE.getBooleanValue(); }
public static boolean loadHDImages() { return GameOption.LOAD_HD_IMAGES.getBooleanValue(); }
/**
* Returns whether or not the mouse wheel is disabled during gameplay.
@@ -1030,8 +1028,8 @@ public class Options {
case "ScoreMeter":
GameOption.SHOW_HIT_ERROR_BAR.setValue(Boolean.parseBoolean(value));
break;
case "Use2xImage":
GameOption.USE_2X_IMAGE.setValue(Boolean.parseBoolean(value));
case "LoadHDImages":
GameOption.LOAD_HD_IMAGES.setValue(Boolean.parseBoolean(value));
break;
case "FixedCS":
GameOption.FIXED_CS.setValue((int) (Float.parseFloat(value) * 10f));
@@ -1145,7 +1143,7 @@ public class Options {
writer.newLine();
writer.write(String.format("ScoreMeter = %b", isHitErrorBarEnabled()));
writer.newLine();
writer.write(String.format("Use2xImage = %b", is2xImagesEnabled()));
writer.write(String.format("LoadHDImages = %b", loadHDImages()));
writer.newLine();
writer.write(String.format(Locale.US, "FixedCS = %.1f", getFixedCS()));
writer.newLine();