fix expanding cursor while in game
This commit is contained in:
parent
c15168a2c6
commit
9d0a84b7ae
|
@ -41,11 +41,13 @@ import org.json.JSONObject;
|
|||
import org.lwjgl.input.Keyboard;
|
||||
import org.newdawn.slick.Animation;
|
||||
import org.newdawn.slick.Color;
|
||||
import org.newdawn.slick.Input;
|
||||
import org.newdawn.slick.util.Log;
|
||||
|
||||
import com.sun.jna.platform.FileUtils;
|
||||
import yugecin.opsudance.core.NotNull;
|
||||
import yugecin.opsudance.core.Nullable;
|
||||
import yugecin.opsudance.options.Options;
|
||||
|
||||
import static yugecin.opsudance.core.errorhandling.ErrorHandler.*;
|
||||
import static yugecin.opsudance.core.InstanceContainer.*;
|
||||
|
@ -152,15 +154,12 @@ public class Utils {
|
|||
* @return true if pressed
|
||||
*/
|
||||
public static boolean isGameKeyPressed() {
|
||||
/*
|
||||
boolean mouseDown = !Options.isMouseDisabled() && (
|
||||
input.isMouseButtonDown(Input.MOUSE_LEFT_BUTTON) ||
|
||||
input.isMouseButtonDown(Input.MOUSE_RIGHT_BUTTON));
|
||||
return (mouseDown ||
|
||||
input.isKeyDown(Options.getGameKeyLeft()) ||
|
||||
input.isKeyDown(Options.getGameKeyRight()));
|
||||
*/
|
||||
return true;
|
||||
return
|
||||
input.isKeyPressed(Options.OPTION_KEY_LEFT.intval) ||
|
||||
input.isKeyPressed(Options.OPTION_KEY_RIGHT.intval) ||
|
||||
(!Options.OPTION_DISABLE_MOUSE_BUTTONS.state && (
|
||||
input.isMousePressed(Input.MOUSE_LEFT_BUTTON) ||
|
||||
input.isMousePressed(Input.MOUSE_RIGHT_BUTTON)));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -707,10 +707,10 @@ public class Game extends ComplexOpsuState {
|
|||
displayContainer.cursor.draw(replayKeyPressed);
|
||||
} else if (GameMod.AUTO.isActive()) {
|
||||
displayContainer.cursor.draw(autoMousePressed);
|
||||
if (OPTION_DANCE_MIRROR.state && GameMod.AUTO.isActive()) {
|
||||
if (OPTION_DANCE_MIRROR.state) {
|
||||
mirrorCursor.draw(autoMousePressed);
|
||||
}
|
||||
} else if (GameMod.AUTOPILOT.isActive()) {
|
||||
} else {
|
||||
displayContainer.cursor.draw(Utils.isGameKeyPressed());
|
||||
}
|
||||
|
||||
|
@ -922,6 +922,8 @@ public class Game extends ComplexOpsuState {
|
|||
}
|
||||
} else if (GameMod.AUTOPILOT.isActive()) {
|
||||
displayContainer.cursor.setCursorPosition(displayContainer.delta, (int) autoMousePosition.x, (int) autoMousePosition.y);
|
||||
} else {
|
||||
displayContainer.cursor.setCursorPosition(displayContainer.delta, displayContainer.mouseX, displayContainer.mouseY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1444,9 +1446,7 @@ public class Game extends ComplexOpsuState {
|
|||
|
||||
super.enter();
|
||||
|
||||
if (isReplay || GameMod.AUTO.isActive() || GameMod.AUTOPILOT.isActive()) {
|
||||
displayContainer.drawCursor = false;
|
||||
}
|
||||
|
||||
isInGame = true;
|
||||
if (!skippedToCheckpoint) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user