added sound option for normal "exit"
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401249
This commit is contained in:
parent
5a091ac33e
commit
b22f9d705e
@ -57,6 +57,12 @@
|
||||
* Specifies the sound that gets played when an item is selected from a menu.
|
||||
*/
|
||||
"MenuItemSound" "buttons/button14.wav"
|
||||
|
||||
/**
|
||||
* Specifies the sound that gets played when an "Exit" button is selected
|
||||
* from a menu.
|
||||
*/
|
||||
"MenuExitSound" "buttons/combine_button7.wav"
|
||||
|
||||
/**
|
||||
* Specifies the sound that gets played when an "Exit Back" button is selected
|
||||
|
@ -843,6 +843,9 @@ ConfigResult MenuManager::OnSourceModConfigChanged(const char *key,
|
||||
} else if (strcmp(key, "MenuExitBackSound") == 0) {
|
||||
m_ExitBackSound.assign(value);
|
||||
return ConfigResult_Accept;
|
||||
} else if (strcmp(key, "MenuExitSound") == 0) {
|
||||
m_ExitSound.assign(value);
|
||||
return ConfigResult_Accept;
|
||||
}
|
||||
|
||||
return ConfigResult_Ignore;
|
||||
@ -856,7 +859,6 @@ const char *MenuManager::GetMenuSound(ItemSelection sel)
|
||||
{
|
||||
case ItemSel_Back:
|
||||
case ItemSel_Next:
|
||||
case ItemSel_Exit:
|
||||
case ItemSel_Item:
|
||||
{
|
||||
if (m_SelectSound.size() > 0)
|
||||
@ -873,6 +875,14 @@ const char *MenuManager::GetMenuSound(ItemSelection sel)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ItemSel_Exit:
|
||||
{
|
||||
if (m_ExitSound.size() > 0)
|
||||
{
|
||||
sound= m_ExitSound.c_str();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
|
@ -135,6 +135,7 @@ private:
|
||||
HandleType_t m_MenuType;
|
||||
String m_SelectSound;
|
||||
String m_ExitBackSound;
|
||||
String m_ExitSound;
|
||||
};
|
||||
|
||||
extern MenuManager g_Menus;
|
||||
|
Loading…
Reference in New Issue
Block a user