Display checkpoint time on game screen after loading.
Also fixed some indentation issues. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
47cf4f4af3
commit
9d3a12ad9c
|
@ -36,6 +36,7 @@ import itdelatrisu.opsu.objects.Spinner;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
import org.newdawn.slick.Color;
|
import org.newdawn.slick.Color;
|
||||||
|
@ -248,7 +249,13 @@ public class Game extends BasicGameState {
|
||||||
|
|
||||||
// checkpoint
|
// checkpoint
|
||||||
if (checkpointLoaded) {
|
if (checkpointLoaded) {
|
||||||
String checkpointText = "~ Playing from checkpoint. ~";
|
int checkpoint = Options.getCheckpoint();
|
||||||
|
String checkpointText = String.format(
|
||||||
|
"~ Playing from checkpoint at %02d:%02d. ~",
|
||||||
|
TimeUnit.MILLISECONDS.toMinutes(checkpoint),
|
||||||
|
TimeUnit.MILLISECONDS.toSeconds(checkpoint) -
|
||||||
|
TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(checkpoint))
|
||||||
|
);
|
||||||
Utils.FONT_MEDIUM.drawString(
|
Utils.FONT_MEDIUM.drawString(
|
||||||
(container.getWidth() - Utils.FONT_MEDIUM.getWidth(checkpointText)) / 2,
|
(container.getWidth() - Utils.FONT_MEDIUM.getWidth(checkpointText)) / 2,
|
||||||
container.getHeight() - 15 - Utils.FONT_MEDIUM.getLineHeight(),
|
container.getHeight() - 15 - Utils.FONT_MEDIUM.getLineHeight(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user