void CBaseActionPlaySoundStartDialog::OnCommand( char const *command ) { if ( !Q_strcasecmp( command, "choosesound" ) ) { if ( !m_hFileOpenDialog.Get() ) { m_hFileOpenDialog = new vgui::FileOpenDialog( this, "Choose .wav file", true ); } if ( m_hFileOpenDialog ) { char startPath[ MAX_PATH ]; Q_strncpy( startPath, com_gamedir, sizeof( startPath ) ); COM_FixSlashes( startPath ); m_hFileOpenDialog->SetStartDirectory( va( "%s/sound", startPath ) ); m_hFileOpenDialog->DoModal( false ); } return; } BaseClass::OnCommand( command ); }