void asw_pick_stim_music_f() { if (g_hSelectStimMusicDialog.Get() == NULL) { g_hSelectStimMusicDialog = new StimMusicSelectDialog(NULL, "#asw_pick_stim_music", vgui::FOD_OPEN, NULL); g_hSelectStimMusicDialog->AddFilter("*.mp3,*.wav", "#asw_stim_music_types", true); } g_hSelectStimMusicDialog->DoModal(false); g_hSelectStimMusicDialog->Activate(); }
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 ); }