From d92e67e5f11ab33991adacd8fd13dd7476026070 Mon Sep 17 00:00:00 2001 From: Jeffrey Han Date: Sat, 17 Jan 2015 00:44:23 -0500 Subject: [PATCH] More quick fixes. - Minor typo in ErrorHandler. - Prevent more than one music control button in the main menu from being hovered over at once. Signed-off-by: Jeffrey Han --- src/itdelatrisu/opsu/ErrorHandler.java | 2 +- src/itdelatrisu/opsu/states/MainMenu.java | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/itdelatrisu/opsu/ErrorHandler.java b/src/itdelatrisu/opsu/ErrorHandler.java index 459261d6..bd84c905 100644 --- a/src/itdelatrisu/opsu/ErrorHandler.java +++ b/src/itdelatrisu/opsu/ErrorHandler.java @@ -131,7 +131,7 @@ public class ErrorHandler { // don't report the error int n = JOptionPane.showOptionDialog(null, message, title, JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE, - null, options, optionsR[1]); + null, options, options[1]); if (n == 0) Desktop.getDesktop().open(Options.LOG_FILE); } diff --git a/src/itdelatrisu/opsu/states/MainMenu.java b/src/itdelatrisu/opsu/states/MainMenu.java index 612fecf3..106fa5c7 100644 --- a/src/itdelatrisu/opsu/states/MainMenu.java +++ b/src/itdelatrisu/opsu/states/MainMenu.java @@ -246,12 +246,14 @@ public class MainMenu extends BasicGameState { logo.hoverUpdate(delta, mouseX, mouseY); playButton.hoverUpdate(delta, mouseX, mouseY); exitButton.hoverUpdate(delta, mouseX, mouseY); - musicPlay.hoverUpdate(delta, mouseX, mouseY); - musicPause.hoverUpdate(delta, mouseX, mouseY); - musicNext.hoverUpdate(delta, mouseX, mouseY); - musicPrevious.hoverUpdate(delta, mouseX, mouseY); if (repoButton != null) repoButton.hoverUpdate(delta, mouseX, mouseY); + musicPlay.hoverUpdate(delta, mouseX, mouseY); + musicPause.hoverUpdate(delta, mouseX, mouseY); + if (musicPlay.contains(mouseX, mouseY)) + mouseX = mouseY = -1; // ensure only one button is in hover state at once + musicNext.hoverUpdate(delta, mouseX, mouseY); + musicPrevious.hoverUpdate(delta, mouseX, mouseY); // window focus change: increase/decrease theme song volume if (MusicController.isThemePlaying() &&