Skip to content

Commit

Permalink
- Prefs UI update for new sound
Browse files Browse the repository at this point in the history
- Labels and checkboxes. Added disabled+Selected 'Display Notification When Match Found' since it should always remain on.
  • Loading branch information
Trenair authored and Sheikah45 committed Jun 26, 2024
1 parent d622700 commit 8de7173
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ public void setIsMatchFoundSoundEnabled(boolean isMatchFoundSoundEnabled) {
public boolean isMatchFoundSoundEnabled() {
return isMatchFoundSoundEnabled.get();
}
public BooleanProperty isMatchFoundSoundEnabledProperty() {
return isMatchFoundSoundEnabled;
}

public int getSilenceBetweenSounds() {
return silenceBetweenSounds.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public class SettingsController extends NodeController<Node> {
public CheckBox playFriendJoinsGameSoundCheckBox;
public CheckBox playFriendPlaysGameSoundCheckBox;
public CheckBox displayPmReceivedToastCheckBox;
public CheckBox displayMatchFoundSoundCheckBox;
public CheckBox displayMatchFoundNotificationCheckBox;
public CheckBox playMatchFoundSoundCheckBox;
public CheckBox playPmReceivedSoundCheckBox;
public CheckBox afterGameReviewCheckBox;
Expand Down Expand Up @@ -397,6 +397,9 @@ private void bindNotificationPreferences() {
.bindBidirectional(notificationPrefs.friendPlaysGameSoundEnabledProperty());
playPmReceivedSoundCheckBox.selectedProperty()
.bindBidirectional(notificationPrefs.privateMessageSoundEnabledProperty());
displayMatchFoundNotificationCheckBox.selectedProperty().setValue(true);
playMatchFoundSoundCheckBox.selectedProperty()
.bindBidirectional(notificationPrefs.isMatchFoundSoundEnabledProperty());
afterGameReviewCheckBox.selectedProperty().bindBidirectional(notificationPrefs.afterGameReviewEnabledProperty());
notifyOnAtMentionOnlyToggle.selectedProperty()
.bindBidirectional(notificationPrefs.notifyOnAtMentionOnlyEnabledProperty());
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/theme/settings/settings.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,8 @@
<Label styleClass="setting-title"
text="%settings.notifications.matchFound"
GridPane.rowIndex="6"/>
<CheckBox fx:id="displayMatchFoundSoundCheckBox" mnemonicParsing="false"
<CheckBox fx:id="displayMatchFoundNotificationCheckBox" mnemonicParsing="false"
disable="true"
GridPane.columnIndex="1" GridPane.halignment="CENTER"
GridPane.rowIndex="6" GridPane.valignment="CENTER"/>
<CheckBox fx:id="playMatchFoundSoundCheckBox" mnemonicParsing="false"
Expand All @@ -609,7 +610,7 @@
GridPane.rowIndex="7"/>
<CheckBox fx:id="afterGameReviewCheckBox" mnemonicParsing="false"
GridPane.columnIndex="1" GridPane.halignment="CENTER"
GridPane.rowIndex="6" GridPane.valignment="CENTER"/>
GridPane.rowIndex="7" GridPane.valignment="CENTER"/>
</children>
</GridPane>
</children>
Expand Down

0 comments on commit 8de7173

Please sign in to comment.