Ejemplo n.º 1
0
void SoundManager::Previous( Event * )
{
	int index;
	
	currentFacet = 0;
	
	if ( current )
	{
		//
		// find current sound in container of sounds
		//
		index = soundList.IndexOfObject( current );
		if ( index > 1 )
		{
			index--;
		}
		else
		{
			index = soundList.NumObjects();
		}
		CurrentLostFocus();
	}
	else
	{
		index = 1;
	}
	
	if ( index <= soundList.NumObjects() )
	{
		current = soundList.ObjectAt( index );
		CurrentGainsFocus();
		UpdateUI();
	}
}
Ejemplo n.º 2
0
void SoundManager::Delete
   (
   Event *ev
   )

   {
   int index = 0;

   if ( !current )
      return;

   if ( soundList.ObjectInList( current ) )
      {
      index = soundList.IndexOfObject( current );
      // remove the speaker
      soundList.RemoveObject( current );
      }
   current->PostEvent( EV_Remove, 0 );

   if ( ( index > 0 ) && ( index < soundList.NumObjects() ) )
      {
      current = soundList.ObjectAt( index );
      CurrentGainsFocus();
      }
   else
      {
      current = NULL;
      }
   
   UpdateUI();
   }
Ejemplo n.º 3
0
void SoundManager::Show( void )
{
	CurrentGainsFocus();
	CancelEventsOfType( EV_SoundManager_ShowingSounds );
	PostEvent( EV_SoundManager_ShowingSounds, FRAMETIME );
	UpdateUI();
}