diff --git a/README.md b/README.md
index 9873cf6..d74411f 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@ which are generated everytime a table highscore changes.
* [Installation](#installation)
* [Configure Highscore Overlay](#configure-highscore-overlay)
* [Configure Highscore Cards](#configure-highscore-cards)
+ * [Highscore Cards with DirectB2S Files](#highscore-cards-width-directb2s-files)
* [Configure DOF Rules](#configure-dof-rules)
* [Table Overview](#table-overview)
* [Service Status](#service-status)
@@ -163,6 +164,18 @@ You can change or remove the screen's default media there (remember you need to
See also https://www.nailbuster.com/wikipinup/doku.php?id=faq
+### Highscore Cards with DirectB2S Files
+
+When highscore cards are generated, it is possible to use the background
+image from the *directb2s* file, if the file is available for the given table.
+These images can vary in size and dimension. Therefore the output ratio must be configure
+so that all cards will have the same dimensions and ratios too.
+
+![](./documentation/directb2s-set.png)
+
+Once set, the ratio will also be applied for cards that are generated from the selected background image.
+
+
## Configure DOF Rules
__Experimental (not tested yet, board resolving may be broken)__
@@ -244,6 +257,13 @@ See also: https://forums.gameex.com/forums/topic/26335-scores-files-text-from-pi
![](./documentation/region-settings.png)
+### I want to use directb2s backgrounds, but my files are located in another folder!
+
+By default, the service assumes that these files are located in the __Tables__ folder
+of Visual Pinball. If you only want to use the files for the background of your highscore cards,
+check the __resources/env.properties__ file and change the path there.
+Note that you have to restart the service/UI to apply the change.
+
## See Also
[Used Third-Party Libraries](./documentation/third-party-licenses/licenses.xml)
diff --git a/pom.xml b/pom.xml
index 19b58c4..48e24ec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -267,7 +267,7 @@
1.0.1
- rename-file
+ rename-jar1
package
rename
diff --git a/resources/card-generator.properties b/resources/card-generator.properties
index bf143ff..73cf499 100644
--- a/resources/card-generator.properties
+++ b/resources/card-generator.properties
@@ -1,4 +1,4 @@
-#Thu Sep 29 22:05:24 CEST 2022
+#Fri Sep 30 14:23:13 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 4784509..724f83c 100644
--- a/resources/overlay-generator.properties
+++ b/resources/overlay-generator.properties
@@ -1,8 +1,8 @@
-#Thu Sep 29 22:05:06 CEST 2022
+#Fri Sep 30 14:23:12 CEST 2022
overlay.alphacomposite.black=0
overlay.alphacomposite.white=0
-overlay.background=background4k.jpg
-overlay.blur=59
+overlay.background=background2k.jpg
+overlay.blur=13
overlay.challengedTable=7
overlay.font.color=\#ffffff
overlay.highscores.row.padding.left=87
diff --git a/resources/overlay.jpg b/resources/overlay.jpg
index f5024a4..4a56bde 100644
Binary files a/resources/overlay.jpg and b/resources/overlay.jpg differ
diff --git a/src/main/java/de/mephisto/vpin/extensions/ConfigWindow.java b/src/main/java/de/mephisto/vpin/extensions/ConfigWindow.java
index c34d911..25f8f70 100644
--- a/src/main/java/de/mephisto/vpin/extensions/ConfigWindow.java
+++ b/src/main/java/de/mephisto/vpin/extensions/ConfigWindow.java
@@ -7,7 +7,6 @@
import de.mephisto.vpin.extensions.resources.ResourceLoader;
import de.mephisto.vpin.extensions.service.ServiceTab;
import de.mephisto.vpin.extensions.table.TablesTab;
-import de.mephisto.vpin.extensions.util.Updater;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/src/main/java/de/mephisto/vpin/extensions/Splash.java b/src/main/java/de/mephisto/vpin/extensions/Splash.java
index 46ceb74..1184e44 100644
--- a/src/main/java/de/mephisto/vpin/extensions/Splash.java
+++ b/src/main/java/de/mephisto/vpin/extensions/Splash.java
@@ -8,7 +8,6 @@
import de.mephisto.vpin.extensions.util.MessageWithLink;
import de.mephisto.vpin.extensions.util.ProgressDialog;
import de.mephisto.vpin.extensions.util.ProgressResultModel;
-import de.mephisto.vpin.extensions.util.Updater;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.LoggerFactory;
@@ -68,10 +67,13 @@ public Splash() {
new Thread(() -> {
try {
+ LOG.info("Splash Screen initialized.");
checkForUpdates();
-
+ LOG.info("Update check completed, creating VPinService instance.");
vPinService = VPinService.create(false);
+ LOG.info("Executing first run check");
runInitialCheck();
+ LOG.info("Starting Main");
startMain();
} catch (VPinServiceException e) {
LOG.error("Failed to start UI: " + e.getMessage(), e);
diff --git a/src/main/java/de/mephisto/vpin/extensions/util/Updater.java b/src/main/java/de/mephisto/vpin/extensions/Updater.java
similarity index 95%
rename from src/main/java/de/mephisto/vpin/extensions/util/Updater.java
rename to src/main/java/de/mephisto/vpin/extensions/Updater.java
index b1eab5b..e3f8a2f 100644
--- a/src/main/java/de/mephisto/vpin/extensions/util/Updater.java
+++ b/src/main/java/de/mephisto/vpin/extensions/Updater.java
@@ -1,4 +1,4 @@
-package de.mephisto.vpin.extensions.util;
+package de.mephisto.vpin.extensions;
import de.mephisto.vpin.util.PropertiesStore;
import org.slf4j.Logger;
@@ -13,7 +13,7 @@
public class Updater {
private final static Logger LOG = LoggerFactory.getLogger(Updater.class);
- private final static String VERSION = "1.0.5";
+ private final static String VERSION = "1.0.6";
private final static String BASE_URL = "https://github.com/syd711/vpin-extensions/releases/download/%s/";
private final static String VERSION_PROPERTIES = "https://raw.githubusercontent.com/syd711/vpin-extensions/main/version.properties";
diff --git a/src/main/java/de/mephisto/vpin/extensions/service/ServiceTab.java b/src/main/java/de/mephisto/vpin/extensions/service/ServiceTab.java
index ca8041e..727baa4 100644
--- a/src/main/java/de/mephisto/vpin/extensions/service/ServiceTab.java
+++ b/src/main/java/de/mephisto/vpin/extensions/service/ServiceTab.java
@@ -76,10 +76,16 @@ public void actionPerformed(ActionEvent e) {
switch (cmd) {
case "start": {
try {
+ boolean running = stateManager.isRunning();
+ if(running) {
+ stateManager.shutdown();
+ }
+
configWindow.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
stateManager.start();
+ stateManager.waitForRunState();
configWindow.setCursor(null);
- boolean running = stateManager.isRunning();
+ running = stateManager.isRunning();
if (running) {
JOptionPane.showMessageDialog(this, "Service start successful.", "Success", JOptionPane.INFORMATION_MESSAGE);
}
diff --git a/src/main/java/de/mephisto/vpin/extensions/util/WidgetFactory.java b/src/main/java/de/mephisto/vpin/extensions/util/WidgetFactory.java
index e885e9b..f99fa6c 100644
--- a/src/main/java/de/mephisto/vpin/extensions/util/WidgetFactory.java
+++ b/src/main/java/de/mephisto/vpin/extensions/util/WidgetFactory.java
@@ -267,7 +267,8 @@ public static JSpinner createSpinner(JPanel parent, String title, String unit, P
public static void createFileChooser(JPanel parent, String label, String buttonLabel, PropertiesStore store, String property, String defaultValue) {
parent.add(new JLabel(label));
String value = store.getString(property, defaultValue);
- parent.add(new JLabel(value), "span 2");
+ JLabel fileNameLabel = new JLabel(value);
+ parent.add(fileNameLabel, "span 2");
JButton openButton = new JButton(buttonLabel);
parent.add(openButton, "span 1");
parent.add(new JLabel(""), "wrap");
@@ -304,6 +305,7 @@ public String getDescription() {
}
store.set(property, field.getSelectedFile().getName());
+ fileNameLabel.setText(field.getSelectedFile().getName());
}
});
}
diff --git a/version.properties b/version.properties
index d86ef89..99d0635 100644
--- a/version.properties
+++ b/version.properties
@@ -1 +1 @@
-version=1.0.5
\ No newline at end of file
+version=1.0.6
\ No newline at end of file