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