diff --git a/resources/card-generator.properties b/resources/card-generator.properties index 73cf499..7f31120 100644 --- a/resources/card-generator.properties +++ b/resources/card-generator.properties @@ -1,4 +1,4 @@ -#Fri Sep 30 14:23:13 CEST 2022 +#Fri Sep 30 18:22:22 CEST 2022 card.alphacomposite.black=5 card.alphacomposite.white=0 card.background=Old Bumbers.jpg diff --git a/resources/overlay-generator.properties b/resources/overlay-generator.properties index 724f83c..26f3bca 100644 --- a/resources/overlay-generator.properties +++ b/resources/overlay-generator.properties @@ -1,9 +1,9 @@ -#Fri Sep 30 14:23:12 CEST 2022 +#Fri Sep 30 18:21:53 CEST 2022 overlay.alphacomposite.black=0 overlay.alphacomposite.white=0 -overlay.background=background2k.jpg +overlay.background=background4k.jpg overlay.blur=13 -overlay.challengedTable=7 +overlay.challengedTable=59 overlay.font.color=\#ffffff overlay.highscores.row.padding.left=87 overlay.highscores.row.separator=24 diff --git a/resources/overlay.jpg b/resources/overlay.jpg index 4a56bde..4190215 100644 Binary files a/resources/overlay.jpg and b/resources/overlay.jpg differ diff --git a/src/main/java/de/mephisto/vpin/extensions/SuperMain.java b/src/main/java/de/mephisto/vpin/extensions/SuperMain.java index 5c044c6..99d77e8 100644 --- a/src/main/java/de/mephisto/vpin/extensions/SuperMain.java +++ b/src/main/java/de/mephisto/vpin/extensions/SuperMain.java @@ -1,9 +1,14 @@ package de.mephisto.vpin.extensions; import de.mephisto.vpin.extensions.generator.OverlayGenerator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SuperMain { + private final static Logger LOG = LoggerFactory.getLogger(SuperMain.class); public static void main(String[] args) throws Exception { + LOG.info("Starting version " + Updater.getCurrentVersion()); + if (args != null && args.length > 0 && args[0].contains("config")) { new Splash(); } diff --git a/src/main/java/de/mephisto/vpin/extensions/generator/OverlayGraphics.java b/src/main/java/de/mephisto/vpin/extensions/generator/OverlayGraphics.java index 07326ec..15eab8f 100644 --- a/src/main/java/de/mephisto/vpin/extensions/generator/OverlayGraphics.java +++ b/src/main/java/de/mephisto/vpin/extensions/generator/OverlayGraphics.java @@ -15,7 +15,9 @@ import java.awt.image.BufferedImage; import java.io.File; import java.util.ArrayList; +import java.util.Comparator; import java.util.List; +import java.util.stream.Collectors; public class OverlayGraphics { private final static Logger LOG = LoggerFactory.getLogger(OverlayGraphics.class); @@ -187,10 +189,15 @@ private static void renderHighscoreList(BufferedImage image, GameInfo gameOfTheM int yStart = highscoreListYOffset + ROW_SEPARATOR + TITLE_FONT_SIZE / 2; - List gameInfos = service.getGameInfos(); - gameInfos.sort((o1, o2) -> (int) (o2.getLastPlayedTime() - o1.getLastPlayedTime())); + List gameInfosWithDate = service.getGameInfos().stream().filter(game -> game.getLastPlayed() != null).collect(Collectors.toList()); + List gameInfosWithOutDate = service.getGameInfos().stream().filter(game -> game.getLastPlayed() == null).collect(Collectors.toList()); - for (GameInfo game : gameInfos) { + List sorted = new ArrayList<>(); + gameInfosWithDate.sort((o1, o2) -> Long.compare(o2.getLastPlayed().getTime(), o1.getLastPlayed().getTime())); + sorted.addAll(gameInfosWithDate); + sorted.addAll(gameInfosWithOutDate); + + for (GameInfo game : sorted) { Highscore highscore = game.resolveHighscore(); if (highscore == null) { LOG.info("Skipped highscore rendering of " + game.getGameDisplayName() + ", no highscore info found");