diff --git a/configs/core.cfg b/configs/core.cfg index fecd11f0..aac079af 100644 --- a/configs/core.cfg +++ b/configs/core.cfg @@ -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 diff --git a/core/MenuManager.cpp b/core/MenuManager.cpp index 593db0b1..887d8a92 100644 --- a/core/MenuManager.cpp +++ b/core/MenuManager.cpp @@ -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; diff --git a/core/MenuManager.h b/core/MenuManager.h index 863bf722..2c1cd21d 100644 --- a/core/MenuManager.h +++ b/core/MenuManager.h @@ -135,6 +135,7 @@ private: HandleType_t m_MenuType; String m_SelectSound; String m_ExitBackSound; + String m_ExitSound; }; extern MenuManager g_Menus;