Skip to content

Commit

Permalink
1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
syd711 committed Sep 30, 2022
1 parent 33026a4 commit 63174c5
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 13 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)__
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
<version>1.0.1</version>
<executions>
<execution>
<id>rename-file</id>
<id>rename-jar1</id>
<phase>package</phase>
<goals>
<goal>rename</goal>
Expand Down
2 changes: 1 addition & 1 deletion resources/card-generator.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions resources/overlay-generator.properties
Original file line number Diff line number Diff line change
@@ -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
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.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 4 additions & 2 deletions src/main/java/de/mephisto/vpin/extensions/Splash.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -304,6 +305,7 @@ public String getDescription() {
}

store.set(property, field.getSelectedFile().getName());
fileNameLabel.setText(field.getSelectedFile().getName());
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=1.0.5
version=1.0.6

0 comments on commit 63174c5

Please sign in to comment.