Skip to content

Commit

Permalink
Merge pull request #600 from syd711/rc3.10.1
Browse files Browse the repository at this point in the history
Rc3.10.1
  • Loading branch information
syd711 authored Nov 17, 2024
2 parents 2db9271 + 9efe340 commit 9ed1bad
Show file tree
Hide file tree
Showing 121 changed files with 929 additions and 472 deletions.
19 changes: 18 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
## Release Notes 3.10
## Release Notes 3.10.1

## Breaking Change

- **Overlay Settings**: Due to a breaking change in the configuration format, you have to reconfigure the overlay settings in the preferences.

## Changes

- **Overlay / Pause Menu / Notifications**: All VPin Studio overlay elements have the additional "Screen" setting now. This allows to show overlays on other screens that are not the primary screen (which may be the case for PinballX users). The default remains the primary screen. So PinUP Popper users should not be affected by this change (beside the fact everyone needs to re-configure the overlay settings).
- **Tables / Table Asset Manager**: Fixed deletion of wheel icons for games and playlist so that the thumbnails of these icons are deleted too. Otherwise, you still may see old icons that have not been cleared from PinUP Popper thumbs folder.
- **Tables / Media Recorder**: Fixed issue that the preview screen section remains empty when launched the first time.
- **Tables / Highscores**: Exchanged icon for the highscore reset button, to indicate that this is more than a simple deletion.
- **Tables / NVOffset Validator**: The validator is more restrictive now and complains only if two tables that use the same ROM and have the same **nvoffset**, either have no or a different VPS table mapping. Note that only the table type is checked, not the table version.
- **Toolbar**: Fixed missing hiding of the frontend UI button that should be hidden when connecting from remote.

---

## Release Notes 3.10.0

## Changes

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>de.mephisto.vpin</groupId>
<artifactId>studio</artifactId>
<version>3.10.0</version>
<version>3.10.1</version>
<packaging>pom</packaging>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion resources/vpsdb.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion vpin-connector-discord/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>studio</artifactId>
<groupId>de.mephisto.vpin</groupId>
<version>3.10.0</version>
<version>3.10.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion vpin-connector-github/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>studio</artifactId>
<groupId>de.mephisto.vpin</groupId>
<version>3.10.0</version>
<version>3.10.1</version>
</parent>
<packaging>jar</packaging>

Expand Down
2 changes: 1 addition & 1 deletion vpin-connector-iscored/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>studio</artifactId>
<groupId>de.mephisto.vpin</groupId>
<version>3.10.0</version>
<version>3.10.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion vpin-connector-vps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>studio</artifactId>
<groupId>de.mephisto.vpin</groupId>
<version>3.10.0</version>
<version>3.10.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion vpin-studio-app/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>studio</artifactId>
<groupId>de.mephisto.vpin</groupId>
<version>3.9.3</version>
<version>3.10.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>vpin-studio-app</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion vpin-studio-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>studio</artifactId>
<groupId>de.mephisto.vpin</groupId>
<version>3.10.0</version>
<version>3.10.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import de.mephisto.vpin.commons.utils.controller.GameControllerInputListener;
import de.mephisto.vpin.restclient.PreferenceNames;
import de.mephisto.vpin.restclient.client.VPinStudioClient;
import de.mephisto.vpin.restclient.preferences.OverlaySettings;
import de.mephisto.vpin.restclient.representations.PreferenceEntryRepresentation;
import de.mephisto.vpin.restclient.util.SystemUtil;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
Expand Down Expand Up @@ -43,7 +45,8 @@ public void start(Stage overlayStage) {

try {
Platform.setImplicitExit(false);
Screen screen = Screen.getPrimary();
OverlaySettings overlaySettings = client.getJsonPreference(PreferenceNames.OVERLAY_SETTINGS, OverlaySettings.class);
Screen screen = SystemUtil.getScreenById(overlaySettings.getOverlayScreenId());

BorderPane root = new BorderPane();
final Scene scene = new Scene(root, screen.getVisualBounds().getWidth(), screen.getVisualBounds().getHeight(), true, SceneAntialiasing.BALANCED);
Expand All @@ -60,18 +63,17 @@ public void start(Stage overlayStage) {
overlayStage.setTitle("VPin Studio Overlay");
overlayStage.getScene().getStylesheets().add(ServerFX.class.getResource("stylesheet.css").toExternalForm());

PreferenceEntryRepresentation preference = client.getPreference(PreferenceNames.OVERLAY_DESIGN);
if (preference == null) {
if (overlaySettings.getDesignType() == null) {
WidgetFactory.showAlert(overlayStage, "Error", "No overlay design selected.", "Select an overlay design from the preferences.");
System.exit(0);
}

String value = preference.getValue();
if (StringUtils.isEmpty(value) || value.equalsIgnoreCase("null")) {
value = "";
String designType = overlaySettings.getDesignType();
if (StringUtils.isEmpty(designType) || designType.equalsIgnoreCase("null")) {
designType = "";
}

String resource = ServerFX.resolveDashboard(value);
String resource = ServerFX.resolveDashboard(designType);
FXMLLoader overlayLoader = new FXMLLoader(OverlayController.class.getResource(resource));
Parent widgetRoot = overlayLoader.load();
OverlayController controller = overlayLoader.getController();
Expand Down
2 changes: 1 addition & 1 deletion vpin-studio-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>studio</artifactId>
<groupId>de.mephisto.vpin</groupId>
<version>3.10.0</version>
<version>3.10.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import de.mephisto.vpin.commons.fx.FrontendScreenController;
import de.mephisto.vpin.commons.fx.pausemenu.model.FrontendScreenAsset;
import de.mephisto.vpin.commons.utils.TransitionUtil;
import de.mephisto.vpin.restclient.util.SystemUtil;
import edu.umd.cs.findbugs.annotations.NonNull;
import javafx.animation.FadeTransition;
import javafx.application.Platform;
Expand Down Expand Up @@ -35,7 +36,7 @@ public Stage showScreen(@NonNull FrontendScreenAsset asset) {
try {
BorderPane root = new BorderPane();
root.setStyle("-fx-background-color: transparent;");
Screen screen = Screen.getPrimary();
Screen screen = SystemUtil.getScreenById(-1);
final Scene scene = new Scene(root, screen.getVisualBounds().getWidth(), screen.getVisualBounds().getHeight(), true, SceneAntialiasing.BALANCED);
scene.setFill(Color.TRANSPARENT);
scene.setCursor(Cursor.NONE);
Expand All @@ -56,7 +57,7 @@ public Stage showScreen(@NonNull FrontendScreenAsset asset) {
screenController.setMediaAsset(asset);
root.setCenter(widgetRoot);
} catch (IOException e) {
LOG.error("Failed to Popper screen: " + e.getMessage(), e);
LOG.error("Failed to frontend screen: " + e.getMessage(), e);
}

showStage(screenStage, asset.getDuration());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import de.mephisto.vpin.commons.fx.pausemenu.model.FrontendScreenAsset;
import de.mephisto.vpin.restclient.frontend.FrontendPlayerDisplay;
import de.mephisto.vpin.restclient.util.SystemUtil;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.geometry.Insets;
Expand Down Expand Up @@ -47,7 +48,7 @@ public void initialize(URL url, ResourceBundle resourceBundle) {

public void setMediaAsset(FrontendScreenAsset screenAsset) {
try {
Screen screen = Screen.getPrimary();
Screen screen = SystemUtil.getScreenById(-1);
Rectangle2D bounds = screen.getVisualBounds();
root.setPadding(new Insets(0, 0, 0, 0)); //reset of the other options
root.setRotate(0);//reset of the other options
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package de.mephisto.vpin.commons.fx;

import de.mephisto.vpin.restclient.PreferenceNames;
import de.mephisto.vpin.restclient.notifications.NotificationSettings;
import de.mephisto.vpin.restclient.preferences.OverlaySettings;
import de.mephisto.vpin.restclient.util.SystemUtil;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.geometry.Rectangle2D;
Expand All @@ -23,7 +27,8 @@ public MaintenanceController() {

@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
Screen screen = Screen.getPrimary();
OverlaySettings overlaySettings = ServerFX.client.getJsonPreference(PreferenceNames.OVERLAY_SETTINGS, OverlaySettings.class);
Screen screen = SystemUtil.getScreenById(overlaySettings.getOverlayScreenId());
Rectangle2D bounds = screen.getVisualBounds();
imageView.setPreserveRatio(false);
imageView.setFitWidth(bounds.getHeight());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import de.mephisto.vpin.restclient.PreferenceNames;
import de.mephisto.vpin.restclient.competitions.CompetitionRepresentation;
import de.mephisto.vpin.restclient.competitions.CompetitionType;
import de.mephisto.vpin.restclient.preferences.OverlaySettings;
import de.mephisto.vpin.restclient.representations.PreferenceEntryRepresentation;
import de.mephisto.vpin.restclient.util.SystemUtil;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.geometry.Rectangle2D;
Expand Down Expand Up @@ -55,7 +57,8 @@ public void initialize(URL url, ResourceBundle resourceBundle) {
}

public void refreshData() {
Rectangle2D screenBounds = Screen.getPrimary().getBounds();
OverlaySettings overlaySettings = ServerFX.client.getJsonPreference(PreferenceNames.OVERLAY_SETTINGS, OverlaySettings.class);
Rectangle2D screenBounds = SystemUtil.getScreenById(overlaySettings.getOverlayScreenId()).getBounds();
if(screenBounds.getWidth() < screenBounds.getHeight()) {
rootStack.setRotate(0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
import de.mephisto.vpin.restclient.OverlayClient;
import de.mephisto.vpin.restclient.PreferenceNames;
import de.mephisto.vpin.restclient.cards.CardSettings;
import de.mephisto.vpin.restclient.games.GameStatus;
import de.mephisto.vpin.restclient.frontend.FrontendPlayerDisplay;
import de.mephisto.vpin.restclient.representations.PreferenceEntryRepresentation;
import de.mephisto.vpin.restclient.games.GameStatus;
import de.mephisto.vpin.restclient.preferences.OverlaySettings;
import de.mephisto.vpin.restclient.util.SystemUtil;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import javafx.application.Application;
Expand Down Expand Up @@ -98,8 +99,8 @@ public void showOverlay(boolean visible) {
overlayVisible = visible;
if (visible) {
try {
PreferenceEntryRepresentation preference = client.getPreference(PreferenceNames.OVERLAY_DESIGN);
String value = preference.getValue();
OverlaySettings overlaySettings = ServerFX.client.getJsonPreference(PreferenceNames.OVERLAY_SETTINGS, OverlaySettings.class);
String value = overlaySettings.getDesignType();
if (StringUtils.isEmpty(value) || value.equalsIgnoreCase("null")) {
value = "";
}
Expand Down Expand Up @@ -168,7 +169,9 @@ public static String resolveDashboard(String value) {

private static String resolveDashboardResolution() {
String resource = "uhd";
Rectangle2D screenBounds = Screen.getPrimary().getBounds();

OverlaySettings overlaySettings = ServerFX.client.getJsonPreference(PreferenceNames.OVERLAY_SETTINGS, OverlaySettings.class);
Rectangle2D screenBounds = SystemUtil.getScreenById(overlaySettings.getOverlayScreenId()).getBounds();
double width = screenBounds.getWidth();
if (screenBounds.getWidth() < screenBounds.getHeight()) {
width = screenBounds.getHeight();
Expand Down Expand Up @@ -196,7 +199,8 @@ public void setMaintenanceVisible(boolean b) {
}

BorderPane root = new BorderPane();
Screen screen = Screen.getPrimary();
OverlaySettings overlaySettings = ServerFX.client.getJsonPreference(PreferenceNames.OVERLAY_SETTINGS, OverlaySettings.class);
Screen screen = SystemUtil.getScreenById(overlaySettings.getOverlayScreenId());
final Scene scene = new Scene(root, screen.getVisualBounds().getWidth(), screen.getVisualBounds().getHeight(), true, SceneAntialiasing.BALANCED);
scene.setCursor(Cursor.NONE);

Expand Down Expand Up @@ -301,11 +305,13 @@ public void showHighscoreCard(@NonNull CardSettings cardSettings, @Nullable Fron
public void start(Stage primaryStage) throws Exception {
INSTANCE = this;

OverlaySettings overlaySettings = ServerFX.client.getJsonPreference(PreferenceNames.OVERLAY_SETTINGS, OverlaySettings.class);

this.overlayStage = primaryStage;
Platform.setImplicitExit(false);

root = new BorderPane();
Screen screen = Screen.getPrimary();
Screen screen = SystemUtil.getScreenById(overlaySettings.getOverlayScreenId());
final Scene scene = new Scene(root, screen.getVisualBounds().getWidth(), screen.getVisualBounds().getHeight(), true, SceneAntialiasing.BALANCED);
scene.setCursor(Cursor.NONE);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package de.mephisto.vpin.commons.fx.notifications;

import de.mephisto.vpin.commons.fx.ServerFX;
import de.mephisto.vpin.restclient.PreferenceNames;
import de.mephisto.vpin.restclient.notifications.NotificationSettings;
import de.mephisto.vpin.restclient.util.SystemUtil;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.geometry.Insets;
Expand Down Expand Up @@ -61,7 +65,8 @@ public void initialize(URL url, ResourceBundle resourceBundle) {
}
}

Rectangle2D screenBounds = Screen.getPrimary().getBounds();
NotificationSettings notificationSettings = ServerFX.client.getJsonPreference(PreferenceNames.NOTIFICATION_SETTINGS, NotificationSettings.class);
Rectangle2D screenBounds = SystemUtil.getScreenById(notificationSettings.getNotificationsScreenId()).getBounds();
if (screenBounds.getHeight() > 2000) {
labelContainer.setPadding(new Insets(0, 0, 0, 650));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package de.mephisto.vpin.commons.fx.notifications;

import de.mephisto.vpin.commons.fx.ServerFX;
import de.mephisto.vpin.commons.utils.TransitionUtil;
import de.mephisto.vpin.restclient.PreferenceNames;
import de.mephisto.vpin.restclient.notifications.NotificationSettings;
import de.mephisto.vpin.restclient.util.SystemUtil;
import javafx.animation.Transition;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
Expand All @@ -26,6 +30,7 @@ public class NotificationStage {
public static final int OFFSET = 30;
private static double scaling = 0.5;
private final Notification notification;
private Rectangle2D screenBounds;
private NotificationController notificationController;

private BorderPane root;
Expand All @@ -45,7 +50,10 @@ public NotificationStage(Notification notification) {
try {
stage.getIcons().add(new Image(NotificationController.class.getResourceAsStream("logo-64.png")));

Rectangle2D screenBounds = Screen.getPrimary().getBounds();
NotificationSettings notificationSettings = ServerFX.client.getJsonPreference(PreferenceNames.NOTIFICATION_SETTINGS, NotificationSettings.class);
Screen screen = SystemUtil.getScreenById(notificationSettings.getNotificationsScreenId());
screenBounds = screen.getBounds();

FXMLLoader loader = new FXMLLoader(NotificationController.class.getResource("notification.fxml"));
root = loader.load();
notificationController = loader.getController();
Expand All @@ -71,7 +79,7 @@ else if (screenBounds.getHeight() > 2000) {
outTransition = TransitionUtil.createTranslateByYTransition(root, 300, (int) (screenBounds.getHeight() / 2));

stage.setY(screenBounds.getHeight() / 2);
stage.setX(0);
stage.setX(screenBounds.getMinX());
scene = new Scene(root, screenBounds.getWidth(), screenBounds.getHeight() / 2);
}
else {
Expand All @@ -98,7 +106,7 @@ else if (screenBounds.getWidth() < 4000) {
outTransition = TransitionUtil.createTranslateByXTransition(root, 300, (int) -(screenBounds.getWidth() / 2));

stage.setY(0);
stage.setX(0);
stage.setX(screenBounds.getMinX());
scene = new Scene(root, screenBounds.getWidth(), screenBounds.getHeight() / 2);
}

Expand All @@ -112,7 +120,6 @@ else if (screenBounds.getWidth() < 4000) {


public void move() {
Rectangle2D screenBounds = Screen.getPrimary().getBounds();
Transition transition = null;
if (screenBounds.getWidth() > screenBounds.getHeight() && !notification.isDesktopMode()) {
transition = TransitionUtil.createTranslateByXTransition(root, 300, (int) (WIDTH * scaling / 3) + OFFSET);
Expand Down
Loading

0 comments on commit 9ed1bad

Please sign in to comment.