use the new errorhandler & bubble notifs

This commit is contained in:
yugecin
2017-01-21 01:16:27 +01:00
parent aceebb95ca
commit f730935622
35 changed files with 199 additions and 147 deletions

View File

@@ -18,9 +18,7 @@
package itdelatrisu.opsu.ui;
import itdelatrisu.opsu.ErrorHandler;
import itdelatrisu.opsu.GameImage;
import itdelatrisu.opsu.Opsu;
import itdelatrisu.opsu.Options;
import itdelatrisu.opsu.Utils;
import itdelatrisu.opsu.audio.MusicController;
@@ -37,6 +35,7 @@ import org.newdawn.slick.*;
import org.newdawn.slick.state.StateBasedGame;
import yugecin.opsudance.Dancer;
import yugecin.opsudance.core.DisplayContainer;
import yugecin.opsudance.core.errorhandling.ErrorHandler;
/**
* Updates and draws the cursor.
@@ -91,7 +90,7 @@ public class Cursor {
IntBuffer tmp = BufferUtils.createIntBuffer(min * min);
emptyCursor = new org.lwjgl.input.Cursor(min, min, min/2, min/2, 1, tmp, null);
} catch (LWJGLException e) {
ErrorHandler.error("Failed to create hidden cursor.", e, true);
ErrorHandler.error("Failed to create hidden cursor.", e).show();
}
}

View File

@@ -18,7 +18,6 @@
package itdelatrisu.opsu.ui;
import itdelatrisu.opsu.ErrorHandler;
import itdelatrisu.opsu.GameImage;
import itdelatrisu.opsu.Options;
import itdelatrisu.opsu.Utils;
@@ -455,19 +454,4 @@ public class UI {
Colors.WHITE_ALPHA.a = oldAlphaW;
}
/**
* Shows a confirmation dialog (used before exiting the game).
* @param message the message to display
* @return true if user selects "yes", false otherwise
*/
public static boolean showExitConfirmation(String message) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
ErrorHandler.error("Could not set system look and feel for exit confirmation.", e, true);
}
int n = JOptionPane.showConfirmDialog(null, message, "Warning",
JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
return (n != JOptionPane.YES_OPTION);
}
}