Skip to content

Commit

Permalink
1.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
syd711 committed Sep 30, 2022
1 parent 4bc5f01 commit f82c9a2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion resources/card-generator.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions resources/overlay-generator.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Binary file modified resources/overlay.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/main/java/de/mephisto/vpin/extensions/SuperMain.java
Original file line number Diff line number Diff line change
@@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -187,10 +189,15 @@ private static void renderHighscoreList(BufferedImage image, GameInfo gameOfTheM

int yStart = highscoreListYOffset + ROW_SEPARATOR + TITLE_FONT_SIZE / 2;

List<GameInfo> gameInfos = service.getGameInfos();
gameInfos.sort((o1, o2) -> (int) (o2.getLastPlayedTime() - o1.getLastPlayedTime()));
List<GameInfo> gameInfosWithDate = service.getGameInfos().stream().filter(game -> game.getLastPlayed() != null).collect(Collectors.toList());
List<GameInfo> gameInfosWithOutDate = service.getGameInfos().stream().filter(game -> game.getLastPlayed() == null).collect(Collectors.toList());

for (GameInfo game : gameInfos) {
List<GameInfo> 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");
Expand Down

0 comments on commit f82c9a2

Please sign in to comment.