diff --git a/src/itdelatrisu/opsu/Options.java b/src/itdelatrisu/opsu/Options.java index 66b50f03..15eff8a0 100644 --- a/src/itdelatrisu/opsu/Options.java +++ b/src/itdelatrisu/opsu/Options.java @@ -55,6 +55,7 @@ import com.sun.jna.platform.win32.Advapi32Util; import com.sun.jna.platform.win32.Win32Exception; import com.sun.jna.platform.win32.WinReg; import yugecin.opsudance.Dancer; +import yugecin.opsudance.MoverDirection; import yugecin.opsudance.ObjectColorOverrides; import yugecin.opsudance.movers.factories.AutoMoverFactory; @@ -571,6 +572,33 @@ public class Options { } }, + DANCE_MOVER_DIRECTION ("Mover direction", "MoverDirection", "The direction the mover goes" ) { + @Override + public String getValueString() { + return Dancer.moverDirection.toString(); + } + + @Override + public Object[] getListItems() { + return MoverDirection.values(); + } + + @Override + public void clickListItem(int index) { + Dancer.moverDirection = MoverDirection.values()[index]; + } + + @Override + public String write() { + return "" + Dancer.moverDirection.nr; + } + + @Override + public void read(String s) { + Dancer.moverDirection = MoverDirection.values()[Integer.parseInt(s)]; + } + }, + DANCE_SPINNER ("Spinner", "Spinner", "Spinner style") { @Override public Object[] getListItems() { diff --git a/src/itdelatrisu/opsu/states/OptionsMenu.java b/src/itdelatrisu/opsu/states/OptionsMenu.java index c8333a52..064580fe 100644 --- a/src/itdelatrisu/opsu/states/OptionsMenu.java +++ b/src/itdelatrisu/opsu/states/OptionsMenu.java @@ -107,6 +107,7 @@ public class OptionsMenu extends BasicGameState { }), DANCE ("Dance", new GameOption[] { GameOption.DANCE_MOVER, + GameOption.DANCE_MOVER_DIRECTION, GameOption.DANCE_SPINNER, GameOption.DANCE_LAZY_SLIDERS, GameOption.DANCE_CIRCLE_STREAMS, diff --git a/src/yugecin/opsudance/MoverDirection.java b/src/yugecin/opsudance/MoverDirection.java index e699e359..427b2b3e 100644 --- a/src/yugecin/opsudance/MoverDirection.java +++ b/src/yugecin/opsudance/MoverDirection.java @@ -30,7 +30,7 @@ public enum MoverDirection { RIGHT ("Right", 1) { @Override public int getDirection(int currentDirection) { - return 0; + return -1; } }, ALTERNATE ("Alternate", 2) { @@ -50,7 +50,7 @@ public enum MoverDirection { }; public String displayName; - private int nr; + public int nr; private static Random rand; @@ -65,4 +65,9 @@ public enum MoverDirection { public abstract int getDirection(int currentDirection); + @Override + public String toString() { + return displayName; + } + }