remove delegating stuff from Input
This commit is contained in:
@@ -31,6 +31,7 @@ import itdelatrisu.opsu.ui.Cursor;
|
||||
import itdelatrisu.opsu.ui.Fonts;
|
||||
import itdelatrisu.opsu.ui.UI;
|
||||
import org.lwjgl.Sys;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.openal.AL;
|
||||
import org.lwjgl.opengl.Display;
|
||||
import org.lwjgl.opengl.DisplayMode;
|
||||
@@ -262,7 +263,8 @@ public class DisplayContainer implements ErrorDumpable, ResolutionChangedListene
|
||||
|
||||
cursor.updateAngle(renderDelta);
|
||||
if (drawCursor) {
|
||||
cursor.draw(input.isMouseButtonDown(Input.MOUSE_LEFT_BUTTON) || input.isMouseButtonDown(Input.MOUSE_RIGHT_BUTTON));
|
||||
cursor.draw(Mouse.isButtonDown(Input.MOUSE_LEFT_BUTTON) ||
|
||||
Mouse.isButtonDown(Input.MOUSE_RIGHT_BUTTON));
|
||||
}
|
||||
UI.drawTooltip(graphics);
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.newdawn.slick.Input;
|
||||
import org.newdawn.slick.InputListener;
|
||||
import yugecin.opsudance.events.BarNotifListener;
|
||||
|
||||
import static org.lwjgl.input.Keyboard.*;
|
||||
import static yugecin.opsudance.core.InstanceContainer.*;
|
||||
import static yugecin.opsudance.options.Options.*;
|
||||
|
||||
@@ -35,22 +36,22 @@ public class GlobalInputListener implements InputListener {
|
||||
|
||||
@Override
|
||||
public boolean keyReleased(int key, char c) {
|
||||
if (key == Input.KEY_F7) {
|
||||
if (key == KEY_F7) {
|
||||
OPTION_TARGET_FPS.clickListItem((targetFPSIndex + 1) % targetFPS.length);
|
||||
BarNotifListener.EVENT.make().onBarNotif(String.format("Frame limiter: %s",
|
||||
OPTION_TARGET_FPS.getValueString()));
|
||||
return true;
|
||||
}
|
||||
if (key == Input.KEY_F10) {
|
||||
if (key == KEY_F10) {
|
||||
OPTION_DISABLE_MOUSE_BUTTONS.toggle();
|
||||
return true;
|
||||
}
|
||||
if (key == Input.KEY_F12) {
|
||||
if (key == KEY_F12) {
|
||||
config.takeScreenShot();
|
||||
return true;
|
||||
}
|
||||
if (key == Input.KEY_S && input.isKeyDown(Input.KEY_LMENU) && input.isKeyDown(Input.KEY_LSHIFT) &&
|
||||
input.isKeyDown(Input.KEY_LCONTROL) && !displayContainer.isInState(Game.class)) {
|
||||
if (key == KEY_S && isKeyDown(KEY_LMENU) && isKeyDown(KEY_LSHIFT) &&
|
||||
input.isControlDown() && !displayContainer.isInState(Game.class)) {
|
||||
skinservice.reloadSkin();
|
||||
}
|
||||
return false;
|
||||
@@ -58,7 +59,7 @@ public class GlobalInputListener implements InputListener {
|
||||
|
||||
@Override
|
||||
public boolean mouseWheelMoved(int delta) {
|
||||
if (input.isKeyDown(Input.KEY_LALT) || input.isKeyDown(Input.KEY_RALT)) {
|
||||
if (isKeyDown(Input.KEY_LALT) || isKeyDown(Input.KEY_RALT)) {
|
||||
UI.changeVolume((delta < 0) ? -1 : 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
*/
|
||||
package yugecin.opsudance.core.state;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.newdawn.slick.Graphics;
|
||||
import org.newdawn.slick.Input;
|
||||
import yugecin.opsudance.core.components.Component;
|
||||
|
||||
import java.util.LinkedList;
|
||||
@@ -165,7 +165,7 @@ public abstract class ComplexOpsuState extends BaseOpsuState {
|
||||
}
|
||||
}
|
||||
if (focusedComponent != null) {
|
||||
if (key == Input.KEY_ESCAPE) {
|
||||
if (key == Keyboard.KEY_ESCAPE) {
|
||||
focusedComponent.setFocused(false);
|
||||
focusedComponent = null;
|
||||
return true;
|
||||
@@ -184,7 +184,7 @@ public abstract class ComplexOpsuState extends BaseOpsuState {
|
||||
}
|
||||
}
|
||||
if (focusedComponent != null) {
|
||||
if (key == Input.KEY_ESCAPE) {
|
||||
if (key == Keyboard.KEY_ESCAPE) {
|
||||
focusedComponent.setFocused(false);
|
||||
focusedComponent = null;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user