diff --git a/src/yugecin/opsudance/ui/OptionsOverlay.java b/src/yugecin/opsudance/ui/OptionsOverlay.java index 7a2bd82c..f1db2c11 100644 --- a/src/yugecin/opsudance/ui/OptionsOverlay.java +++ b/src/yugecin/opsudance/ui/OptionsOverlay.java @@ -134,7 +134,7 @@ public class OptionsOverlay { return true; } int idx = getOptionIdxAt(y); - if (idx < options.length) { + if (idx >= 0 && idx < options.length) { final Options.GameOption option = options[idx]; selectedOption = option; Object[] listItems = option.getListItems(); diff --git a/src/yugecin/opsudance/ui/SBOverlay.java b/src/yugecin/opsudance/ui/SBOverlay.java index 65dfa8e6..8f241205 100644 --- a/src/yugecin/opsudance/ui/SBOverlay.java +++ b/src/yugecin/opsudance/ui/SBOverlay.java @@ -83,6 +83,13 @@ public class SBOverlay { Fonts.SMALL.drawString(10, 50 + i++ * lh, option.getKey().getDisplayName(), Color.cyan); } } + if (gameObjects.length > 0) { + int start = gameObjects[0].getTime(); + int end = gameObjects[gameObjects.length - 1].getEndTime(); + float curtime = (float) (MusicController.getPosition() - start) / (end - start); + g.setColor(Color.red); + g.fillRect(curtime * width, height - 10f, 10f, 10f); + } if (menu) { options.render(container, game, g); }