diff --git a/src/itdelatrisu/opsu/states/ButtonMenu.java b/src/itdelatrisu/opsu/states/ButtonMenu.java index ca899a0d..e3532c23 100644 --- a/src/itdelatrisu/opsu/states/ButtonMenu.java +++ b/src/itdelatrisu/opsu/states/ButtonMenu.java @@ -79,13 +79,6 @@ public class ButtonMenu extends BaseOpsuState { public void leave() { Button.CANCEL.click(); } - - @Override - public void mouseWheelMoved(int newValue) { - if (displayContainer.input.isKeyDown(Input.KEY_LALT) || displayContainer.input.isKeyDown(Input.KEY_RALT)) { - super.mouseWheelMoved(newValue); - } - } }, /** The initial beatmap management screen (for a "favorite" beatmap). */ BEATMAP_FAVORITE (new Button[] { Button.CLEAR_SCORES, Button.FAVORITE_REMOVE, Button.DELETE, Button.CANCEL }) { diff --git a/src/itdelatrisu/opsu/states/DownloadsMenu.java b/src/itdelatrisu/opsu/states/DownloadsMenu.java index da518b84..e0465ebc 100644 --- a/src/itdelatrisu/opsu/states/DownloadsMenu.java +++ b/src/itdelatrisu/opsu/states/DownloadsMenu.java @@ -847,9 +847,7 @@ public class DownloadsMenu extends ComplexOpsuState { @Override public boolean mouseWheelMoved(int newValue) { - // change volume - if (displayContainer.input.isKeyDown(Input.KEY_LALT) || displayContainer.input.isKeyDown(Input.KEY_RALT)) { - UI.changeVolume((newValue < 0) ? -1 : 1); + if (super.mouseWheelMoved(newValue)) { return true; } diff --git a/src/itdelatrisu/opsu/states/GameRanking.java b/src/itdelatrisu/opsu/states/GameRanking.java index 224adadc..398e741c 100644 --- a/src/itdelatrisu/opsu/states/GameRanking.java +++ b/src/itdelatrisu/opsu/states/GameRanking.java @@ -121,9 +121,6 @@ public class GameRanking extends BaseOpsuState { @Override public boolean mouseWheelMoved(int newValue) { - if (displayContainer.input.isKeyDown(Input.KEY_LALT) || displayContainer.input.isKeyDown(Input.KEY_RALT)) { - UI.changeVolume((newValue < 0) ? -1 : 1); - } return true; } diff --git a/src/itdelatrisu/opsu/states/MainMenu.java b/src/itdelatrisu/opsu/states/MainMenu.java index 46717efb..e22e0946 100644 --- a/src/itdelatrisu/opsu/states/MainMenu.java +++ b/src/itdelatrisu/opsu/states/MainMenu.java @@ -639,6 +639,10 @@ public class MainMenu extends BaseOpsuState { @Override public boolean mouseWheelMoved(int newValue) { + if (super.mouseWheelMoved(newValue)) { + return true; + } + UI.changeVolume((newValue < 0) ? -1 : 1); return true; } diff --git a/src/itdelatrisu/opsu/states/SongMenu.java b/src/itdelatrisu/opsu/states/SongMenu.java index ec54b372..bf5bb17f 100644 --- a/src/itdelatrisu/opsu/states/SongMenu.java +++ b/src/itdelatrisu/opsu/states/SongMenu.java @@ -1238,11 +1238,6 @@ public class SongMenu extends ComplexOpsuState { Input input = displayContainer.input; - if (input.isKeyDown(Input.KEY_LALT) || input.isKeyDown(Input.KEY_RALT)) { - UI.changeVolume((newValue < 0) ? -1 : 1); - return true; - } - if (isInputBlocked()) { return true; } diff --git a/src/yugecin/opsudance/core/state/BaseOpsuState.java b/src/yugecin/opsudance/core/state/BaseOpsuState.java index cad0e9f5..47f58058 100644 --- a/src/yugecin/opsudance/core/state/BaseOpsuState.java +++ b/src/yugecin/opsudance/core/state/BaseOpsuState.java @@ -20,6 +20,7 @@ package yugecin.opsudance.core.state; import itdelatrisu.opsu.Options; import itdelatrisu.opsu.Utils; import itdelatrisu.opsu.states.Game; +import itdelatrisu.opsu.ui.UI; import org.newdawn.slick.Graphics; import org.newdawn.slick.Input; import yugecin.opsudance.core.DisplayContainer; @@ -114,6 +115,10 @@ public abstract class BaseOpsuState implements OpsuState, EventListener