diff --git a/src/itdelatrisu/opsu/Options.java b/src/itdelatrisu/opsu/Options.java index 116033ed..51389705 100644 --- a/src/itdelatrisu/opsu/Options.java +++ b/src/itdelatrisu/opsu/Options.java @@ -848,6 +848,28 @@ public class Options { } }, + DANCE_CURSOR_TRAIL_OVERRIDE ("Cursor trail length override", "CursorTrailOverride", "Override cursor trail length", Dancer.cursortraillength, 20, 400) { + @Override + public String getValueString() { + if (val == 20) { + return "Disabled"; + } + return "" + val; + } + + @Override + public void drag(GameContainer container, int d) { + super.drag(container, d); + Dancer.cursortraillength = val; + } + + @Override + public void read(String s) { + super.read(s); + Dancer.cursortraillength = val; + } + }, + DANCE_HIDE_OBJECTS ("Don't draw objects", "HideObj", "If you only want to see cursors :)", Dancer.hideobjects) { @Override public void click(GameContainer container) { diff --git a/src/itdelatrisu/opsu/states/OptionsMenu.java b/src/itdelatrisu/opsu/states/OptionsMenu.java index 613c8ed8..87ffa00e 100644 --- a/src/itdelatrisu/opsu/states/OptionsMenu.java +++ b/src/itdelatrisu/opsu/states/OptionsMenu.java @@ -122,6 +122,7 @@ public class OptionsMenu extends BasicGameState { GameOption.DANCE_CURSOR_COLOR_OVERRIDE, GameOption.DANCE_CURSOR_MIRROR_COLOR_OVERRIDE, GameOption.DANCE_RGB_CURSOR_INC, + GameOption.DANCE_CURSOR_TRAIL_OVERRIDE, GameOption.DANCE_REMOVE_BG, GameOption.DANCE_HIDE_OBJECTS, GameOption.DANCE_HIDE_UI, diff --git a/src/itdelatrisu/opsu/ui/Cursor.java b/src/itdelatrisu/opsu/ui/Cursor.java index dacc3f31..58bbb22a 100644 --- a/src/itdelatrisu/opsu/ui/Cursor.java +++ b/src/itdelatrisu/opsu/ui/Cursor.java @@ -186,6 +186,10 @@ public class Cursor { removeCount = trail.size() - max; } + if (Dancer.cursortraillength > 20) { + removeCount = trail.size() - Dancer.cursortraillength; + } + // remove points from the lists for (int i = 0; i < removeCount && !trail.isEmpty(); i++) trail.remove(); diff --git a/src/yugecin/opsudance/Dancer.java b/src/yugecin/opsudance/Dancer.java index 30cb2d5c..edbd37b1 100644 --- a/src/yugecin/opsudance/Dancer.java +++ b/src/yugecin/opsudance/Dancer.java @@ -68,6 +68,7 @@ public class Dancer { public static int rgbcursorhueinc = 100; // this should really get its own place somewhere... public static MoverDirection moverDirection = MoverDirection.RANDOM; public static boolean hideobjects = false; + public static int cursortraillength = 20; private int dir; private GameObject d = new DummyObject();