FIRE-9856: Mute sound effects disable plays sound from collisions and plays sound from gestures checkbox not disable after restart/relog

Northspring 2015-04-02 23:12:52 +02:00
parent fb21b1dd86
commit 888086317e
6 changed files with 37 additions and 5 deletions

View File

@ -2560,6 +2560,13 @@ void LLFloaterPreference::updateUISoundsControls()
getChild<LLCheckBoxCtrl>("PlayModeUISndRestartOpenSim")->setVisible(TRUE);
#endif
getChild<LLComboBox>("UseLSLFlightAssist")->setValue((int)gSavedPerAccountSettings.getF32("UseLSLFlightAssist")); // Flight Assist combo box; Not sound-related, but better to place it here instead of creating whole new void
// FIRE-9856: Mute sound effects disable plays sound from collisions and plays sound from gestures checkbox not disable after restart/relog
bool mute_sound_effects = gSavedSettings.getBOOL("MuteSounds");
bool mute_all_sounds = gSavedSettings.getBOOL("MuteAudio");
getChild<LLCheckBoxCtrl>("gesture_audio_play_btn")->setEnabled(!(mute_sound_effects || mute_all_sounds));
getChild<LLCheckBoxCtrl>("collisions_audio_play_btn")->setEnabled(!(mute_sound_effects || mute_all_sounds));
}
// </FS:PP>

View File

@ -73,6 +73,13 @@ BOOL LLPanelVolumePulldown::postBuild()
LLSliderCtrl* volslider = getChild<LLSliderCtrl>( "System Volume" );
volslider->setValue(gSavedSettings.getF32("AudioLevelMaster"));
// <FS:PP> FIRE-9856: Mute sound effects disable plays sound from collisions and plays sound from gestures checkbox not disable after restart/relog
bool mute_sound_effects = gSavedSettings.getBOOL("MuteSounds");
bool mute_all_sounds = gSavedSettings.getBOOL("MuteAudio");
getChild<LLCheckBoxCtrl>("gesture_audio_play_btn")->setEnabled(!(mute_sound_effects || mute_all_sounds));
getChild<LLCheckBoxCtrl>("collisions_audio_play_btn")->setEnabled(!(mute_sound_effects || mute_all_sounds));
// </FS:PP>
return LLPanel::postBuild();
}

View File

@ -10506,8 +10506,16 @@ void volume_controls_on_click_set_sounds(const LLUICtrl* ctrl)
{
// Disable Enable gesture/collisions sounds checkbox if the master sound is disabled
// or if sound effects are disabled.
volume_control_panel->getChild<LLCheckBoxCtrl>("gesture_audio_play_btn")->setEnabled(!gSavedSettings.getBOOL("MuteSounds"));
volume_control_panel->getChild<LLCheckBoxCtrl>("collisions_audio_play_btn")->setEnabled(!gSavedSettings.getBOOL("MuteSounds"));
// <FS:PP> FIRE-9856: Mute sound effects disable plays sound from collisions and plays sound from gestures checkbox not disable after restart/relog
// volume_control_panel->getChild<LLCheckBoxCtrl>("gesture_audio_play_btn")->setEnabled(!gSavedSettings.getBOOL("MuteSounds"));
// volume_control_panel->getChild<LLCheckBoxCtrl>("collisions_audio_play_btn")->setEnabled(!gSavedSettings.getBOOL("MuteSounds"));
bool mute_sound_effects = gSavedSettings.getBOOL("MuteSounds");
bool mute_all_sounds = gSavedSettings.getBOOL("MuteAudio");
volume_control_panel->getChild<LLCheckBoxCtrl>("gesture_audio_play_btn")->setEnabled(!(mute_sound_effects || mute_all_sounds));
volume_control_panel->getChild<LLCheckBoxCtrl>("collisions_audio_play_btn")->setEnabled(!(mute_sound_effects || mute_all_sounds));
// </FS:PP>
}
}

View File

@ -68,7 +68,10 @@
left_pad="5"
name="mute_audio"
tab_stop="false"
width="16" />
width="16">
<button.commit_callback
function="Pref.SetSounds"/>
</button>
<check_box
control_name="MuteWhenMinimized"
height="15"

View File

@ -47,7 +47,11 @@
image_unselected="Audio_Off"
is_toggle="true"
tab_stop="false"
/>
>
<button.commit_callback
function="Pref.SetSounds"
/>
</button>
<button
name="prefs_btn"
left_pad="8"

View File

@ -56,7 +56,10 @@
left_pad="5"
name="mute_audio"
tab_stop="false"
width="16" />
width="16">
<button.commit_callback
function="Pref.SetSounds"/>
</button>
<slider
control_name="AudioLevelUI"
disabled_control="MuteAudio"