Bug fixes and tweaks.

- Check if other Desktop actions are supported (follow-up to #114).
- The cursor-middle image is no longer scaled (when clicking).
- Changed the options menu background image (created with Trianglify at http://qrohlf.com/trianglify/), and made it fit the entire page.
- Slightly increased minimum splash screen time.
- Switched more animations to use AnimatedValue.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-08-08 12:04:15 -05:00
parent cd59c332ab
commit 40ab94794f
8 changed files with 116 additions and 89 deletions

View File

@@ -196,7 +196,7 @@ public class MainMenu extends BasicGameState {
// initialize repository button
float startX = width * 0.997f, startY = height * 0.997f;
if (Desktop.isDesktopSupported()) { // only if a webpage can be opened
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { // only if a webpage can be opened
Image repoImg = GameImage.REPOSITORY.getImage();
repoButton = new MenuButton(repoImg,
startX - repoImg.getWidth(), startY - repoImg.getHeight()
@@ -501,7 +501,9 @@ public class MainMenu extends BasicGameState {
else if (repoButton != null && repoButton.contains(x, y)) {
try {
Desktop.getDesktop().browse(Options.REPOSITORY_URI);
} catch (IOException | UnsupportedOperationException e) {
} catch (UnsupportedOperationException e) {
UI.sendBarNotification("The repository web page could not be opened.");
} catch (IOException e) {
ErrorHandler.error("Could not browse to repository URI.", e, false);
}
}