@@ -371,6 +371,7 @@ public class ConfigWindow {
371371 private JRadioButton audioPanelOverrideAudioSettingOffButton ;
372372 private JCheckBox audioPanelFixSpiderWebDummySoundCheckbox ;
373373 private JCheckBox audioPanelFixSfxDelayCheckbox ;
374+ private JSlider audioPanelNotifVolumeSlider ;
374375 private JCheckBox soundEffectAdvanceCheckbox ;
375376 private JCheckBox soundEffectAnvilCheckbox ;
376377 private JCheckBox soundEffectChiselCheckbox ;
@@ -3210,6 +3211,43 @@ public void actionPerformed(ActionEvent e) {
32103211 "Fixes a bug where sound effects were delayed by a significant amount." );
32113212 SearchUtils .addSearchMetadata (audioPanelFixSfxDelayCheckbox , CommonMetadata .SFX .getText ());
32123213
3214+ JPanel audioPanelNotifVolumePanel = new JPanel ();
3215+ audioPanel .add (audioPanelNotifVolumePanel );
3216+ audioPanelNotifVolumePanel .setLayout (
3217+ new BoxLayout (audioPanelNotifVolumePanel , BoxLayout .Y_AXIS ));
3218+ audioPanelNotifVolumePanel .setAlignmentX (Component .LEFT_ALIGNMENT );
3219+ audioPanelNotifVolumePanel .setBorder (BorderFactory .createEmptyBorder (0 , 0 , osScaleMul (10 ), 0 ));
3220+
3221+ JLabel audioPanelNotifVolumeLabel =
3222+ new JLabel (Launcher .binaryPrefix + "RSC+ notifications volume" );
3223+ audioPanelNotifVolumeLabel .setToolTipText (
3224+ "Sets the volume for the " + Launcher .binaryPrefix + "RSC+ notification sounds" );
3225+ audioPanelNotifVolumePanel .add (audioPanelNotifVolumeLabel );
3226+ audioPanelNotifVolumeLabel .setAlignmentY (1.0f );
3227+ SearchUtils .addSearchMetadata (audioPanelNotifVolumeLabel , CommonMetadata .ALERT .getText ());
3228+
3229+ audioPanelNotifVolumePanel .add (Box .createRigidArea (osScaleMul (new Dimension (0 , 5 ))));
3230+
3231+ audioPanelNotifVolumeSlider = new JSlider ();
3232+
3233+ audioPanelNotifVolumePanel .add (audioPanelNotifVolumeSlider );
3234+ audioPanelNotifVolumeSlider .setAlignmentX (Component .LEFT_ALIGNMENT );
3235+ audioPanelNotifVolumeSlider .setMaximumSize (osScaleMul (new Dimension (350 , 55 )));
3236+ audioPanelNotifVolumeSlider .setMinorTickSpacing (5 );
3237+ audioPanelNotifVolumeSlider .setMajorTickSpacing (10 );
3238+ audioPanelNotifVolumeSlider .setMinimum (0 );
3239+ audioPanelNotifVolumeSlider .setMaximum (100 );
3240+ audioPanelNotifVolumeSlider .setPaintTicks (true );
3241+
3242+ Hashtable <Integer , JLabel > audioPanelNotifVolumeTable = new Hashtable <Integer , JLabel >();
3243+ audioPanelNotifVolumeTable .put (new Integer (0 ), new JLabel ("0" ));
3244+ audioPanelNotifVolumeTable .put (new Integer (25 ), new JLabel ("25" ));
3245+ audioPanelNotifVolumeTable .put (new Integer (50 ), new JLabel ("50" ));
3246+ audioPanelNotifVolumeTable .put (new Integer (75 ), new JLabel ("75" ));
3247+ audioPanelNotifVolumeTable .put (new Integer (100 ), new JLabel ("100" ));
3248+ audioPanelNotifVolumeSlider .setLabelTable (audioPanelNotifVolumeTable );
3249+ audioPanelNotifVolumeSlider .setPaintLabels (true );
3250+
32133251 addSettingsHeader (audioPanel , "Toggle individual sound effects" );
32143252
32153253 JPanel audioPanelEnableAllSfxPanel = new JPanel ();
@@ -3768,8 +3806,12 @@ public void actionPerformed(ActionEvent e) {
37683806 notificationPanelNotifSoundsPanel .setLayout (
37693807 new BoxLayout (notificationPanelNotifSoundsPanel , BoxLayout .Y_AXIS ));
37703808 notificationPanelNotifSoundsPanel .setAlignmentX (Component .LEFT_ALIGNMENT );
3809+ SearchUtils .addSearchMetadata (
3810+ notificationPanelNotifSoundsPanel , CommonMetadata .ALERT .getText ());
37713811 notificationPanelNotifSoundsCheckbox =
3772- addCheckbox ("Enable notification sounds" , notificationPanelNotifSoundsPanel );
3812+ addCheckbox (
3813+ "Enable notification sounds (adjust volume in Audio settings)" ,
3814+ notificationPanelNotifSoundsPanel );
37733815 notificationPanelNotifSoundsCheckbox .setBorder (
37743816 BorderFactory .createEmptyBorder (0 , 0 , osScaleMul (7 ), 0 ));
37753817 notificationPanelNotifSoundsCheckbox .setToolTipText (
@@ -3995,6 +4037,8 @@ public void actionPerformed(ActionEvent e) {
39954037 addCheckbox ("Mute the alert sound even if it's an important message" , notificationPanel );
39964038 notificationPanelMuteImportantMessageSoundsCheckbox .setToolTipText (
39974039 "Muting for Important Messages (defined in text fields above)" );
4040+ SearchUtils .addSearchMetadata (
4041+ notificationPanelMuteImportantMessageSoundsCheckbox , CommonMetadata .ALERT .getText ());
39984042
39994043 addPanelBottomGlue (notificationPanel );
40004044
@@ -5330,7 +5374,8 @@ private enum CommonMetadata {
53305374 COLOUR ("colours" , "colors" , "coloured" , "colored" ),
53315375 PVP ("pvp" , "pk" ),
53325376 PM ("private" , "messages" , "pms" , "dms" , "msgs" ),
5333- DIR ("folders" , "dirs" , "directory" , "directories" , "files" );
5377+ DIR ("folders" , "dirs" , "directory" , "directories" , "files" ),
5378+ ALERT ("alerts" , "dings" , "notifications" );
53345379
53355380 public final String text ;
53365381
@@ -6487,6 +6532,7 @@ private void executeSynchronizeGuiValues() {
64876532 audioPanelFixSpiderWebDummySoundCheckbox .setSelected (
64886533 Settings .SOUND_EFFECT_COMBAT1 .get (Settings .currentProfile ));
64896534 audioPanelFixSfxDelayCheckbox .setSelected (Settings .FIX_SFX_DELAY .get (Settings .currentProfile ));
6535+ audioPanelNotifVolumeSlider .setValue (Settings .NOTIF_VOLUME .get (Settings .currentProfile ));
64906536 soundEffectAdvanceCheckbox .setSelected (
64916537 Settings .SOUND_EFFECT_ADVANCE .get (Settings .currentProfile ));
64926538 soundEffectAnvilCheckbox .setSelected (Settings .SOUND_EFFECT_ANVIL .get (Settings .currentProfile ));
@@ -6960,6 +7006,7 @@ private void saveSettings() {
69607006 Settings .SOUND_EFFECT_COMBAT1 .put (
69617007 Settings .currentProfile , audioPanelFixSpiderWebDummySoundCheckbox .isSelected ());
69627008 Settings .FIX_SFX_DELAY .put (Settings .currentProfile , audioPanelFixSfxDelayCheckbox .isSelected ());
7009+ Settings .NOTIF_VOLUME .put (Settings .currentProfile , audioPanelNotifVolumeSlider .getValue ());
69637010 Settings .SOUND_EFFECT_ADVANCE .put (
69647011 Settings .currentProfile , soundEffectAdvanceCheckbox .isSelected ());
69657012 Settings .SOUND_EFFECT_ANVIL .put (Settings .currentProfile , soundEffectAnvilCheckbox .isSelected ());
@@ -7278,6 +7325,7 @@ private void applySettings() {
72787325 Item .patchItemCommands ();
72797326 GameApplet .syncFontSetting ();
72807327 SoundEffects .adjustMudClientSfxVolume ();
7328+ SoundEffects .adjustNotificationsVolume ();
72817329 });
72827330 }
72837331
0 commit comments