Add UI Sound setting for closing script dialogs
parent
c26d037f11
commit
5bb91bbae2
|
|
@ -797,9 +797,19 @@ void LLFloater::closeFloater(bool app_quitting)
|
||||||
&& !getHost()
|
&& !getHost()
|
||||||
&& !app_quitting
|
&& !app_quitting
|
||||||
&& floaterName != "toast") // <FS:PP> FIRE-10373 / BUG-6437
|
&& floaterName != "toast") // <FS:PP> FIRE-10373 / BUG-6437
|
||||||
|
{
|
||||||
|
// <FS:Zi> UI Sounds connection
|
||||||
|
// make_ui_sound("UISndWindowClose");
|
||||||
|
if (getName() == "script_floater")
|
||||||
|
{
|
||||||
|
make_ui_sound("UISndScriptFloaterClose");
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
make_ui_sound("UISndWindowClose");
|
make_ui_sound("UISndWindowClose");
|
||||||
}
|
}
|
||||||
|
// </FS:Zi>
|
||||||
|
}
|
||||||
|
|
||||||
gFocusMgr.clearLastFocusForGroup(this);
|
gFocusMgr.clearLastFocusForGroup(this);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16979,6 +16979,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<string>c80260ba-41fd-8a46-768a-6bf236360e3a</string>
|
<string>c80260ba-41fd-8a46-768a-6bf236360e3a</string>
|
||||||
</map>
|
</map>
|
||||||
|
<key>UISndScriptFloaterClose</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Sound file for closing a script dialog (uuid for sound asset)</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>String</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<string>2c346eda-b60c-ab33-1119-b8941916a499</string>
|
||||||
|
</map>
|
||||||
<key>UISpinctrlBtnHeight</key>
|
<key>UISpinctrlBtnHeight</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|
@ -22747,6 +22758,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</map>
|
</map>
|
||||||
|
<key>PlayModeUISndScriptFloaterClose</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Holds state for Prefs > Sound/Media > UI Sounds - UISndScriptFloaterClose.</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Boolean</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</map>
|
||||||
<!-- End: Prefs > Sound/Media => UI Sounds -->
|
<!-- End: Prefs > Sound/Media => UI Sounds -->
|
||||||
<key>FSShowMyOwnVoiceVisualizer</key>
|
<key>FSShowMyOwnVoiceVisualizer</key>
|
||||||
<map>
|
<map>
|
||||||
|
|
|
||||||
|
|
@ -507,6 +507,18 @@
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
|
<key>PlayModeUISndScriptFloaterClose</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Holds state for Prefs > Sound/Media > UI Sounds - UISndScriptFloaterClose.</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Boolean</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</map>
|
||||||
|
|
||||||
<key>FSLegacyNotificationWell</key>
|
<key>FSLegacyNotificationWell</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|
|
||||||
|
|
@ -435,6 +435,7 @@ void init_audio()
|
||||||
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndChatMention")));
|
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndChatMention")));
|
||||||
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndRestartOpenSim"))); // <FS:Ansariel> Preload OpenSim restart sound
|
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndRestartOpenSim"))); // <FS:Ansariel> Preload OpenSim restart sound
|
||||||
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndScriptFloaterOpen"))); // <FS:PP> Separate sound for opening script dialogs
|
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndScriptFloaterOpen"))); // <FS:PP> Separate sound for opening script dialogs
|
||||||
|
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndScriptFloaterClose"))); // <FS:Zi> Separate sound for closing script dialogs
|
||||||
// <FS:Zi> Pie menu
|
// <FS:Zi> Pie menu
|
||||||
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuAppear")));
|
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuAppear")));
|
||||||
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuHide")));
|
gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuHide")));
|
||||||
|
|
|
||||||
|
|
@ -3146,7 +3146,7 @@ Hover your mouse cursor over UUID field to show its default value.
|
||||||
width="150"
|
width="150"
|
||||||
tool_tip="Sound UUID played when script opens a dialog window."
|
tool_tip="Sound UUID played when script opens a dialog window."
|
||||||
name="textFSScriptFloaterOpen">
|
name="textFSScriptFloaterOpen">
|
||||||
Script dialog:
|
Script dialog opens:
|
||||||
</text>
|
</text>
|
||||||
<line_editor
|
<line_editor
|
||||||
follows="left|top"
|
follows="left|top"
|
||||||
|
|
@ -3193,6 +3193,62 @@ Hover your mouse cursor over UUID field to show its default value.
|
||||||
left_pad="1"
|
left_pad="1"
|
||||||
width="120" />
|
width="120" />
|
||||||
|
|
||||||
|
<text
|
||||||
|
layout="topleft"
|
||||||
|
follows="left|top"
|
||||||
|
top_pad="7"
|
||||||
|
left="5"
|
||||||
|
height="14"
|
||||||
|
width="150"
|
||||||
|
tool_tip="Sound UUID played when script closes a dialog window."
|
||||||
|
name="textFSScriptFloaterClose">
|
||||||
|
Script dialog closes:
|
||||||
|
</text>
|
||||||
|
<line_editor
|
||||||
|
follows="left|top"
|
||||||
|
left_pad="5"
|
||||||
|
height="20"
|
||||||
|
max_length_chars="256"
|
||||||
|
name="UISndScriptFloaterClose"
|
||||||
|
control_name="UISndScriptFloaterClose"
|
||||||
|
width="218"/>
|
||||||
|
<button
|
||||||
|
follows="left|top"
|
||||||
|
name="Prev_UISndScriptFloaterClose"
|
||||||
|
height="20"
|
||||||
|
label="P"
|
||||||
|
layout="topleft"
|
||||||
|
top_delta="-1"
|
||||||
|
left_pad="1"
|
||||||
|
width="17"
|
||||||
|
sound_flags="0"
|
||||||
|
tool_tip="Preview this sound.">
|
||||||
|
<button.commit_callback
|
||||||
|
function="PreviewUISound"
|
||||||
|
parameter="UISndScriptFloaterClose"/>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
follows="left|top"
|
||||||
|
name="Def_UISndScriptFloaterClose"
|
||||||
|
height="20"
|
||||||
|
label="D"
|
||||||
|
layout="topleft"
|
||||||
|
left_pad="1"
|
||||||
|
width="17"
|
||||||
|
tool_tip="Reset to the default UUID.">
|
||||||
|
<button.commit_callback
|
||||||
|
function="ResetControl"
|
||||||
|
parameter="UISndScriptFloaterClose"/>
|
||||||
|
</button>
|
||||||
|
<check_box
|
||||||
|
control_name="PlayModeUISndScriptFloaterClose"
|
||||||
|
height="20"
|
||||||
|
label="Play this sound"
|
||||||
|
layout="topleft"
|
||||||
|
name="PlayModeUISndScriptFloaterClose"
|
||||||
|
left_pad="1"
|
||||||
|
width="120" />
|
||||||
|
|
||||||
<text
|
<text
|
||||||
layout="topleft"
|
layout="topleft"
|
||||||
follows="left|top"
|
follows="left|top"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue