class ButtonPlaySoundView extends BaseButtonView
{
	private editable var m_SoundPrefix : CName;
	default m_SoundPrefix = 'Button';
	private editable var m_PressSoundName : CName;
	default m_PressSoundName = 'OnPress';
	private editable var m_HoverSoundName : CName;

	protected override function ButtonStateChanged( oldState : inkEButtonState, newState : inkEButtonState )
	{
		if( IsNameValid( m_SoundPrefix ) )
		{
			switch( newState )
			{
				case inkEButtonState.Press:
					if( IsNameValid( m_PressSoundName ) )
					{
						PlaySound( m_SoundPrefix, m_PressSoundName );
					}
				break;
				case inkEButtonState.Hover:
					if( oldState != inkEButtonState.Press )
					{
						if( IsNameValid( m_HoverSoundName ) )
						{
							PlaySound( m_SoundPrefix, m_HoverSoundName );
						}
					}
				break;
				default:
					break;
			}
		}
	}

}

