merge the movers into one list, use java8 for default impl in interfaces
This commit is contained in:
@@ -595,51 +595,31 @@ public class Options {
|
||||
DISABLE_UPDATER ("Disable Automatic Updates", "DisableUpdater", "Disable automatic checking for updates upon starting opsu!.", false),
|
||||
ENABLE_WATCH_SERVICE ("Enable Watch Service", "WatchService", "Watch the beatmap directory for changes. Requires a restart.", false),
|
||||
|
||||
DANCE_MOVER_TYPE("Mover Type", "Mover type", "More than 2 Points", Dancer.multipoint) {
|
||||
@Override
|
||||
public void click(GameContainer container) {
|
||||
bool = !bool;
|
||||
Dancer.multipoint = bool;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(String s) {
|
||||
super.read(s);
|
||||
Dancer.multipoint = bool;
|
||||
}
|
||||
},
|
||||
|
||||
DANCE_MOVER ("Mover algorithm", "Mover", "Algorithm that decides how to move from note to note" ) {
|
||||
@Override
|
||||
public Object[] getListItems() {
|
||||
return Dancer.multipoint ? Dancer.polyMoverFactories : Dancer.moverFactories;
|
||||
return Dancer.moverFactories;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clickListItem(int index) {
|
||||
if (Dancer.multipoint)
|
||||
Dancer.instance.setPolyMoverFactoryIndex(index);
|
||||
else
|
||||
Dancer.instance.setMoverFactoryIndex(index);
|
||||
Dancer.instance.setMoverFactoryIndex(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValueString() {
|
||||
return Dancer.multipoint ? Dancer.polyMoverFactories[Dancer.instance.getPolyMoverFactoryIndex()].toString() : Dancer.moverFactories[Dancer.instance.getMoverFactoryIndex()].toString();
|
||||
return Dancer.moverFactories[Dancer.instance.getMoverFactoryIndex()].toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String write() {
|
||||
return String.valueOf(Dancer.multipoint ? Dancer.instance.getPolyMoverFactoryIndex() : Dancer.instance.getMoverFactoryIndex());
|
||||
return String.valueOf(Dancer.instance.getMoverFactoryIndex());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(String s) {
|
||||
int i = Integer.parseInt(s);
|
||||
if (Dancer.multipoint)
|
||||
Dancer.instance.setPolyMoverFactoryIndex(i);
|
||||
else
|
||||
Dancer.instance.setMoverFactoryIndex(i);
|
||||
Dancer.instance.setMoverFactoryIndex(i);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -424,11 +424,7 @@ public class Game extends BasicGameState {
|
||||
autoMousePressed = false;
|
||||
if (GameMod.AUTO.isActive() || GameMod.AUTOPILOT.isActive()) {
|
||||
Vec2f autoPoint;
|
||||
int lastObjectForDancer = beatmap.objects.length;
|
||||
if (Dancer.multipoint) {
|
||||
lastObjectForDancer -= Dancer.polyMoverFactories[Dancer.instance.getPolyMoverFactoryIndex()].getMinBufferSize();
|
||||
}
|
||||
if (objectIndex < lastObjectForDancer) {
|
||||
if (objectIndex < beatmap.objects.length - Dancer.instance.getPolyMoverFactoryMinBufferSize()) {
|
||||
Dancer d = Dancer.instance;
|
||||
d.update(trackPosition, objectIndex);
|
||||
autoPoint = new Vec2f(d.x, d.y);
|
||||
|
||||
@@ -112,7 +112,6 @@ public class OptionsMenu extends BasicGameState {
|
||||
GameOption.ENABLE_WATCH_SERVICE
|
||||
}),
|
||||
DANCE ("Dance", new GameOption[] {
|
||||
GameOption.DANCE_MOVER_TYPE,
|
||||
GameOption.DANCE_MOVER,
|
||||
GameOption.DANCE_MOVER_DIRECTION,
|
||||
GameOption.DANCE_SLIDER_MOVER_TYPE,
|
||||
|
||||
Reference in New Issue
Block a user