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(); } }
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(); }
void SoundManager::Show( void ) { CurrentGainsFocus(); CancelEventsOfType( EV_SoundManager_ShowingSounds ); PostEvent( EV_SoundManager_ShowingSounds, FRAMETIME ); UpdateUI(); }