cleanup options
This commit is contained in:
parent
9b5dc4c121
commit
ae6ce0d60e
|
@ -23,7 +23,6 @@ import itdelatrisu.opsu.Utils;
|
||||||
import itdelatrisu.opsu.states.Game;
|
import itdelatrisu.opsu.states.Game;
|
||||||
import itdelatrisu.opsu.ui.Fonts;
|
import itdelatrisu.opsu.ui.Fonts;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
import org.newdawn.slick.Input;
|
|
||||||
import org.newdawn.slick.SlickException;
|
import org.newdawn.slick.SlickException;
|
||||||
import org.newdawn.slick.openal.SoundStore;
|
import org.newdawn.slick.openal.SoundStore;
|
||||||
import org.newdawn.slick.util.Log;
|
import org.newdawn.slick.util.Log;
|
||||||
|
@ -46,77 +45,79 @@ import static yugecin.opsudance.core.InstanceContainer.*;
|
||||||
public class Options {
|
public class Options {
|
||||||
|
|
||||||
// internal options (not displayed in-game)
|
// internal options (not displayed in-game)
|
||||||
public static final Option OPTION_BEATMAP_DIRECTORY = new Option("BeatmapDirectory") {
|
static {
|
||||||
@Override
|
new Option("BeatmapDirectory") {
|
||||||
public String write() {
|
@Override
|
||||||
return config.BEATMAP_DIR.getAbsolutePath();
|
public String write() {
|
||||||
}
|
return config.BEATMAP_DIR.getAbsolutePath();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void read(String s) {
|
public void read(String s) {
|
||||||
config.beatmapDir = new File(s);
|
config.beatmapDir = new File(s);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final Option OPTION_OSZ_DIRECTORY = new Option("OSZDirectory") {
|
new Option("OSZDirectory") {
|
||||||
@Override
|
@Override
|
||||||
public String write() {
|
public String write() {
|
||||||
return config.oszDir.getAbsolutePath();
|
return config.oszDir.getAbsolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void read(String s) {
|
public void read(String s) {
|
||||||
config.oszDir = new File(s);
|
config.oszDir = new File(s);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final Option OPTION_SCREENSHOT_DIRECTORY = new Option("ScreenshotDirectory") {
|
new Option("ScreenshotDirectory") {
|
||||||
@Override
|
@Override
|
||||||
public String write() {
|
public String write() {
|
||||||
return config.screenshotDir.getAbsolutePath();
|
return config.screenshotDir.getAbsolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void read(String s) {
|
public void read(String s) {
|
||||||
config.screenshotDir = new File(s);
|
config.screenshotDir = new File(s);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final Option OPTION_REPLAY_DIRECTORY = new Option("ReplayDirectory") {
|
new Option("ReplayDirectory") {
|
||||||
@Override
|
@Override
|
||||||
public String write() {
|
public String write() {
|
||||||
return config.replayDir.getAbsolutePath();
|
return config.replayDir.getAbsolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void read(String s) {
|
public void read(String s) {
|
||||||
config.replayDir = new File(s);
|
config.replayDir = new File(s);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final Option OPTION_REPLAY_IMPORT_DIRECTORY = new Option("ReplayImportDirectory") {
|
new Option("ReplayImportDirectory") {
|
||||||
@Override
|
@Override
|
||||||
public String write() {
|
public String write() {
|
||||||
return config.replayImportDir.getAbsolutePath();
|
return config.replayImportDir.getAbsolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void read(String s) {
|
public void read(String s) {
|
||||||
config.replayImportDir = new File(s);
|
config.replayImportDir = new File(s);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final Option OPTION_SKIN_DIRECTORY = new Option("SkinDirectory") {
|
new Option("SkinDirectory") {
|
||||||
@Override
|
@Override
|
||||||
public String write() {
|
public String write() {
|
||||||
return config.skinRootDir.getAbsolutePath();
|
return config.skinRootDir.getAbsolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void read(String s) {
|
public void read(String s) {
|
||||||
config.skinRootDir = new File(s);
|
config.skinRootDir = new File(s);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public static final NumericOption OPTION_PORT = new NumericOption("-", "Port", "-", 49250, 1024, 65535) {
|
public static final NumericOption OPTION_PORT = new NumericOption("-", "Port", "-", 49250, 1024, 65535) {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user