Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
syd711 committed Nov 15, 2024
1 parent 5b67d13 commit 678b2d3
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 22 deletions.
Binary file modified documentation/preferences/controller-bindings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/recorder/notifications.png
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 @@ -50,7 +50,7 @@ private void onFileSelect(ActionEvent e) {
StudioFileChooser fileChooser = new StudioFileChooser();
fileChooser.setTitle("Select Image");
fileChooser.getExtensionFilters().addAll(
new FileChooser.ExtensionFilter("Image", "*.png", "*.jpg", "*.jpeg"));
new FileChooser.ExtensionFilter("Image", "*.png", "*.jpg", "*.jpeg"));

File selection = fileChooser.showOpenDialog(stage);
if (selection != null) {
Expand All @@ -62,7 +62,12 @@ private void onFileSelect(ActionEvent e) {
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
if (Features.MANIA_ENABLED) {
cabinet = maniaClient.getCabinetClient().getCabinet();
try {
cabinet = maniaClient.getCabinetClient().getCabinet();
}
catch (Exception e) {
LOG.error("Failed to read cabinet info: {}", e.getMessage());
}
if (cabinet != null) {
vpinNameText.textProperty().addListener((observableValue, s, t1) -> debouncer.debounce("cabinetName", () -> {
if (StringUtils.isEmpty(t1)) {
Expand All @@ -74,7 +79,8 @@ public void initialize(URL url, ResourceBundle resourceBundle) {

try {
maniaClient.getCabinetClient().update(cabinet);
} catch (Exception e) {
}
catch (Exception e) {
LOG.error("Failed to update cabinet name for VPin Mania: " + e.getMessage(), e);
WidgetFactory.showAlert(stage, "Error", "Failed to update cabinet name for VPin Mania: " + e.getMessage());
}
Expand All @@ -95,14 +101,14 @@ private void refreshAvatar() {

avatarBorderPane.setCenter(null);
avatar = TileBuilder.create()
.skinType(Tile.SkinType.IMAGE)
.prefSize(300, 300)
.backgroundColor(Color.TRANSPARENT)
.image(image)
.imageMask(Tile.ImageMask.ROUND)
.textSize(Tile.TextSize.BIGGER)
.textAlignment(TextAlignment.CENTER)
.build();
.skinType(Tile.SkinType.IMAGE)
.prefSize(300, 300)
.backgroundColor(Color.TRANSPARENT)
.image(image)
.imageMask(Tile.ImageMask.ROUND)
.textSize(Tile.TextSize.BIGGER)
.textAlignment(TextAlignment.CENTER)
.build();
avatarBorderPane.setCenter(avatar);
avatar.setImage(image);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class ManiaPreferencesController implements Initializable, PreferenceChan
@FXML
private void onIdCopy() {
Cabinet cabinet = maniaClient.getCabinetClient().getCabinet();
if(cabinet != null) {
if (cabinet != null) {
Clipboard clipboard = Clipboard.getSystemClipboard();
ClipboardContent content = new ClipboardContent();
content.putString(cabinet.getUuid());
Expand All @@ -100,7 +100,8 @@ private void onAccountDelete() {
try {
client.getPlayerService().savePlayer(player);
LOG.info("Resetted VPin Mania account for " + player);
} catch (Exception e) {
}
catch (Exception e) {
LOG.error("Failed to de-register player account: " + e.getMessage(), e);
}

Expand All @@ -114,7 +115,8 @@ private void onAccountDelete() {
settings.setEnabled(false);
try {
settings = client.getTournamentsService().saveSettings(settings);
} catch (Exception e) {
}
catch (Exception e) {
LOG.error("Failed to save tournament settings: " + e.getMessage(), e);
WidgetFactory.showAlert(Studio.stage, "Error", "Failed to save tournament settings: " + e.getMessage());
}
Expand All @@ -127,7 +129,13 @@ public void initialize(URL url, ResourceBundle resourceBundle) {
preferencesPanel.managedProperty().bindBidirectional(preferencesPanel.visibleProperty());
registrationPanel.managedProperty().bindBidirectional(registrationPanel.visibleProperty());

Cabinet cabinet = maniaClient.getCabinetClient().getCabinet();
Cabinet cabinet = null;
try {
cabinet = maniaClient.getCabinetClient().getCabinet();
}
catch (Exception e) {
LOG.error("Failed to load cabinet setting: {}", e.getMessage());
}
registrationPanel.setVisible(cabinet == null);

if (cabinet != null) {
Expand Down Expand Up @@ -168,7 +176,8 @@ public void initialize(URL url, ResourceBundle resourceBundle) {

settings.setEnabled(true);
settings = client.getTournamentsService().saveSettings(settings);
} catch (Exception e) {
}
catch (Exception e) {
registrationCheckbox.setSelected(false);
LOG.error("Failed to save tournament settings: " + e.getMessage(), e);
WidgetFactory.showAlert(Studio.stage, "Error", "Registration failed! Please contact the administrator (see preference footer for details).");
Expand All @@ -185,7 +194,8 @@ public void initialize(URL url, ResourceBundle resourceBundle) {
try {
settings.setDefaultDashboardUrl(t1);
settings = client.getTournamentsService().saveSettings(settings);
} catch (Exception e) {
}
catch (Exception e) {
LOG.error("Failed to save tournament settings: " + e.getMessage(), e);
}
}, 300));
Expand All @@ -197,7 +207,8 @@ public void changed(ObservableValue<? extends Boolean> observable, Boolean oldVa
try {
settings.setSubmitAllScores(newValue);
settings = client.getTournamentsService().saveSettings(settings);
} catch (Exception e) {
}
catch (Exception e) {
LOG.error("Failed to save tournament settings: " + e.getMessage(), e);
}
}
Expand All @@ -210,7 +221,8 @@ public void changed(ObservableValue<? extends Boolean> observable, Boolean oldVa
try {
settings.setTournamentsEnabled(newValue);
settings = client.getTournamentsService().saveSettings(settings);
} catch (Exception e) {
}
catch (Exception e) {
LOG.error("Failed to save tournament settings: " + e.getMessage(), e);
}
}
Expand All @@ -220,7 +232,8 @@ public void changed(ObservableValue<? extends Boolean> observable, Boolean oldVa
try {
settings.setDefaultDiscordLink(t1);
settings = client.getTournamentsService().saveSettings(settings);
} catch (Exception e) {
}
catch (Exception e) {
LOG.error("Failed to save tournament settings: " + e.getMessage(), e);
}
}, 300));
Expand All @@ -229,7 +242,8 @@ public void changed(ObservableValue<? extends Boolean> observable, Boolean oldVa
try {
settings.setDefaultWebsite(t1);
settings = client.getTournamentsService().saveSettings(settings);
} catch (Exception e) {
}
catch (Exception e) {
LOG.error("Failed to save tournament settings: " + e.getMessage(), e);
}
}, 300));
Expand All @@ -242,7 +256,8 @@ public void changed(ObservableValue<? extends Boolean> observable, Boolean oldVa
try {
settings.setDefaultDescription(value);
settings = client.getTournamentsService().saveSettings(settings);
} catch (Exception e) {
}
catch (Exception e) {
LOG.error("Failed to save tournament settings: " + e.getMessage(), e);
}
}, 300));
Expand Down

0 comments on commit 678b2d3

Please sign in to comment.