add visual indicator for map progress

This commit is contained in:
yugecin 2016-11-13 03:12:26 +01:00
parent b969946fc4
commit 6f083d47da

View File

@ -83,6 +83,13 @@ public class SBOverlay {
Fonts.SMALL.drawString(10, 50 + i++ * lh, option.getKey().getDisplayName(), Color.cyan); 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) { if (menu) {
options.render(container, game, g); options.render(container, game, g);
} }