Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First support of backglass versions #746

Draft
wants to merge 25 commits into
base: rc3.13
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bc021f5
First support of backglass versions
leprinco Feb 11, 2025
44d822b
delete DMD image applies on selected version
leprinco Feb 11, 2025
0a1026a
fix selection
leprinco Feb 11, 2025
60f79af
added delete backglass version
leprinco Feb 11, 2025
af9dd77
Backglass Versions
syd711 Feb 11, 2025
0fbf5b1
small fix
leprinco Feb 11, 2025
65ee46b
merge
syd711 Feb 11, 2025
5180d4a
Merge branch 'leprinco/backglass-versions' of https://github.com/syd7…
syd711 Feb 11, 2025
6b5c1f3
repair game available
leprinco Feb 11, 2025
4af62c9
Merge branch 'leprinco/backglass-versions' of https://github.com/syd7…
leprinco Feb 11, 2025
477a7b9
cache + remove backglassService dep for displaying NB B2S in tableOve…
leprinco Feb 11, 2025
edd6537
Merge branch 'rc3.13' into leprinco/backglass-versions
leprinco Feb 12, 2025
aa741b9
merge
syd711 Feb 12, 2025
c45b8b7
Merge branch 'leprinco/backglass-versions' of https://github.com/syd7…
syd711 Feb 12, 2025
8294cff
Backglass Manager declutter
syd711 Feb 12, 2025
0e9105d
Backglass Manager declutter
syd711 Feb 12, 2025
97e5ee2
add getSelectedVersion()
leprinco Feb 12, 2025
6617e40
split backglassController and backglassSidebarController
leprinco Feb 13, 2025
1dc1573
qa
syd711 Feb 13, 2025
39bc4de
quicker saving
syd711 Feb 13, 2025
22493c6
qa
syd711 Feb 13, 2025
9ceaa9e
Merge branch 'leprinco/backglass-versions' of https://github.com/syd7…
syd711 Feb 13, 2025
af111d6
layout stuff
syd711 Feb 13, 2025
7dbf1de
doc
syd711 Feb 13, 2025
8eab90d
rc and main merge
syd711 Feb 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Changes

- **Tables / Table Overview**: Added new column **Rating**. You can directly rate the game inside the column without opening the data manager.
- **Tables / Table overview**: Add disabled colors on new columns (playlists, rating, ...).
- **Tables / Table overview**: Added disabled status on new columns (playlists, rating, ...).
- **Tables / Patching**:
- Added "Patch Version" field to the data manager for those who want to track this separately. **Note that by default, the value is written into the field "Custom5" for PinUP Popper users**. You can disable this in the server settings.
- Added "Patch Version" field to the patch upload dialog.
Expand Down
2 changes: 1 addition & 1 deletion resources/vpsdb.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<POV>
<desktop>
<inclination>45.000000</inclination>
<fov>45.000000</fov>
<layback>0.000000</layback>
<rotation>0.000000</rotation>
<xscale>1.000000</xscale>
<yscale>1.000000</yscale>
<zscale>1.000000</zscale>
<xoffset>0.000000</xoffset>
<yoffset>10.000000</yoffset>
<zoffset>-200.000000</zoffset>
</desktop>
<fullscreen>
<inclination>0.000000</inclination>
<fov>27.000000</fov>
<layback>76.000000</layback>
<rotation>270.000000</rotation>
<xscale>1.000000</xscale>
<yscale>1.191999</yscale>
<zscale>1.000000</zscale>
<xoffset>10.400021</xoffset>
<yoffset>0.000000</yoffset>
<zoffset>-230.000000</zoffset>
</fullscreen>
<fullsinglescreen>
<inclination>54.000000</inclination>
<fov>32.000000</fov>
<layback>0.000000</layback>
<rotation>0.000000</rotation>
<xscale>1.000000</xscale>
<yscale>1.000000</yscale>
<zscale>1.000000</zscale>
<xoffset>0.000000</xoffset>
<yoffset>0.000000</yoffset>
<zoffset>-250.000000</zoffset>
</fullsinglescreen>
<customsettings>
<SSAA>-1</SSAA>
<postprocAA>-1</postprocAA>
<ingameAO>-1</ingameAO>
<ScSpReflect>-1</ScSpReflect>
<FPSLimiter>-1</FPSLimiter>
<OverwriteDetailsLevel>0</OverwriteDetailsLevel>
<DetailsLevel>10</DetailsLevel>
<BallReflection>-1</BallReflection>
<BallTrail>-1</BallTrail>
<BallTrailStrength>0.392157</BallTrailStrength>
<OverwriteNightDay>1</OverwriteNightDay>
<NightDayLevel>43</NightDayLevel>
<GameplayDifficulty>50.000000</GameplayDifficulty>
<PhysicsSet>0</PhysicsSet>
<IncludeFlipperPhysics>0</IncludeFlipperPhysics>
<SoundVolume>100</SoundVolume>
<MusicVolume>100</MusicVolume>
</customsettings>
</POV>

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# V2.1.1.0
# This is a ScreenRes file for the B2SBackglassServer.
# From release 1.3.1.1 comment lines like this starting with a '#' are supported.
# Playfield Screen resolution width/height
1680
1050
# Backglass width/height
564
599
# Define Backglass screen using Display Devicename screen number (\\.\DISPLAY)x or screen coordinates (@x) or screen index (=x)
2
# Backglass x/y position relative to the upper left corner of the screen selected
206
0
# width/height of the B2S (or Full) DMD area
880
495
# x/y position of the B2S (or Full) DMD area - relative to the upper left corner of the backglass window
20
720
# Y-flip, flips the LED display upside down
0
# Background x/y position - relative to the backglass screen - has to be activated in the settings
0
0
# Background width/height
977
599
# path to the background image (C:\path\Frame) or black if none selected
C:\Visual Pinball\tables\_Frames\damier.jpg
# This line would turn off B2SWindowPunch if activated
B2SWindowPunch=off
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,7 @@ public static FontIcon createCheckIcon() {
}

public static HBox createCheckAndUpdateIcon(String tooltip) {
HBox root = new HBox(3);
root.setAlignment(Pos.CENTER);
Label icon1 = new Label();
icon1.setGraphic(createCheckIcon("#FFFFFF"));
Label icon2 = new Label();
icon2.setTooltip(new Tooltip(tooltip));
icon2.setGraphic(createUpdateIcon());

root.getChildren().addAll(icon2, icon1);
return root;
return addUpdateIcon(createCheckIcon("#FFFFFF"), tooltip);
}

public static FontIcon createUpdateStar() {
Expand Down Expand Up @@ -230,6 +221,14 @@ public static FontIcon createIcon(String s, String color) {
return fontIcon;
}

public static FontIcon createIcon(String s, int size, String color) {
FontIcon fontIcon = new FontIcon();
fontIcon.setIconSize(size);
fontIcon.setIconColor(Paint.valueOf(color != null? color : "#FFFFFF"));
fontIcon.setIconLiteral(s);
return fontIcon;
}

public static FontIcon createCheckboxIcon() {
FontIcon fontIcon = new FontIcon();
fontIcon.setIconSize(18);
Expand All @@ -250,7 +249,6 @@ public static FontIcon createCheckboxIcon(@Nullable String color) {
return fontIcon;
}


public static Label createCheckboxIcon(@Nullable String color, @NonNull String tooltip) {
Label label = new Label();
label.setTooltip(new Tooltip(tooltip));
Expand Down Expand Up @@ -292,6 +290,26 @@ public static FontIcon createExclamationIcon(@Nullable String color) {
return fontIcon;
}

public static HBox addUpdateIcon(FontIcon icon, String tooltip) {
HBox root = new HBox(3);
root.setAlignment(Pos.CENTER);
Label icon1 = new Label();
icon1.setGraphic(icon);
Label icon2 = new Label();
icon2.setTooltip(new Tooltip(tooltip));
icon2.setGraphic(createUpdateIcon());

root.getChildren().addAll(icon2, icon1);
return root;
}
public static Label wrapIcon(FontIcon icon, @NonNull String tooltip) {
Label label = new Label();
label.setTooltip(new Tooltip(tooltip));
label.setGraphic(icon);
return label;
}


public static String hexColor(Integer color) {
String hex = "FFFFFF";
if (color != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package de.mephisto.vpin.restclient;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface JsonArg {
String value() default "";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package de.mephisto.vpin.restclient;

import java.io.IOException;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.io.IOUtils;
import org.springframework.core.MethodParameter;
import org.springframework.web.bind.support.WebDataBinderFactory;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.ModelAndViewContainer;

import com.fasterxml.jackson.databind.ObjectMapper;

public class JsonArgResolver implements HandlerMethodArgumentResolver{

private static final String JSONBODYATTRIBUTE = "JSON_REQUEST_BODY";

@Override
public boolean supportsParameter(MethodParameter parameter) {
return parameter.hasParameterAnnotation(JsonArg.class);
}

@Override
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception {
String name = parameter.getParameterName();
Map<String, Object> values = getRequestBody(webRequest);
return values.get(name);
}

@SuppressWarnings("unchecked")
private Map<String, Object> getRequestBody(NativeWebRequest webRequest){
HttpServletRequest servletRequest = webRequest.getNativeRequest(HttpServletRequest.class);
HashMap<String, Object> jsonBody = (HashMap<String, Object>) servletRequest.getAttribute(JSONBODYATTRIBUTE);
if (jsonBody==null){
try {
String body = IOUtils.toString(servletRequest.getInputStream(), Charset.forName("UTF-8"));
jsonBody = new ObjectMapper().readValue(body, HashMap.class);
servletRequest.setAttribute(JSONBODYATTRIBUTE, jsonBody);
} catch (IOException e) {
throw new RuntimeException("JsonArg, cannot parse body into Map");
}
}
return jsonBody;
}

}
Loading