added sound option for normal "exit"
authorDavid Anderson <dvander@alliedmods.net>
Wed Aug 01 17:51:38 2007 +0000 (2007-08-01)
changeset 124351a088fbf549
parent 1242 3fc9ab811b9f
child 1244 989675c02a03
added sound option for normal "exit"
configs/core.cfg
core/MenuManager.cpp
core/MenuManager.h
     1.1 --- a/configs/core.cfg	Wed Aug 01 16:52:51 2007 +0000
     1.2 +++ b/configs/core.cfg	Wed Aug 01 17:51:38 2007 +0000
     1.3 @@ -57,6 +57,12 @@
     1.4  	 * Specifies the sound that gets played when an item is selected from a menu.
     1.5  	 */
     1.6  	"MenuItemSound"			"buttons/button14.wav"
     1.7 +
     1.8 +	/**
     1.9 +	 * Specifies the sound that gets played when an "Exit" button is selected 
    1.10 +	 * from a menu.
    1.11 +	 */
    1.12 +	"MenuExitSound"			"buttons/combine_button7.wav"
    1.13  	
    1.14  	/**
    1.15  	 * Specifies the sound that gets played when an "Exit Back" button is selected 
     2.1 --- a/core/MenuManager.cpp	Wed Aug 01 16:52:51 2007 +0000
     2.2 +++ b/core/MenuManager.cpp	Wed Aug 01 17:51:38 2007 +0000
     2.3 @@ -843,6 +843,9 @@
     2.4  	} else if (strcmp(key, "MenuExitBackSound") == 0) {
     2.5  		m_ExitBackSound.assign(value);
     2.6  		return ConfigResult_Accept;
     2.7 +	} else if (strcmp(key, "MenuExitSound") == 0) {
     2.8 +		m_ExitSound.assign(value);
     2.9 +		return ConfigResult_Accept;
    2.10  	}
    2.11  
    2.12  	return ConfigResult_Ignore;
    2.13 @@ -856,7 +859,6 @@
    2.14  	{
    2.15  	case ItemSel_Back:
    2.16  	case ItemSel_Next:
    2.17 -	case ItemSel_Exit:
    2.18  	case ItemSel_Item:
    2.19  		{
    2.20  			if (m_SelectSound.size() > 0)
    2.21 @@ -873,6 +875,14 @@
    2.22  			}
    2.23  			break;
    2.24  		}
    2.25 +	case ItemSel_Exit:
    2.26 +		{
    2.27 +			if (m_ExitSound.size() > 0)
    2.28 +			{
    2.29 +				sound= m_ExitSound.c_str();
    2.30 +			}
    2.31 +			break;
    2.32 +		}
    2.33  	default:
    2.34  		{
    2.35  			break;
     3.1 --- a/core/MenuManager.h	Wed Aug 01 16:52:51 2007 +0000
     3.2 +++ b/core/MenuManager.h	Wed Aug 01 17:51:38 2007 +0000
     3.3 @@ -135,6 +135,7 @@
     3.4  	HandleType_t m_MenuType;
     3.5  	String m_SelectSound;
     3.6  	String m_ExitBackSound;
     3.7 +	String m_ExitSound;
     3.8  };
     3.9  
    3.10  extern MenuManager g_Menus;