Merge branch 'sb'

This commit is contained in:
yugecin 2016-11-13 03:12:33 +01:00
commit 3a0de6df90
2 changed files with 8 additions and 1 deletions

View File

@ -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();

View File

@ -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);
}