diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 4bac917164..648a166050 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -11,6 +11,9 @@ StepMania 5.0 $next | 2011xxxx 2011/10/08 ---------- * [GameSoundManager] Add the PlayMusicPart lua binding. [Wolfman2000] +* [ScreenEdit] Add the FadeInPreview and FadeOutPreview metrics. This controls + how long the fade in and fade outs are for playing the preview music. + The default values are 0 and 1.5 respectively. [Wolfman2000] 2011/10/07 ---------- diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index bfb1aaa55b..f084578c6b 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -3654,6 +3654,9 @@ Beat0OffsetFormat="%s:\n %.3f secs\n" PreviewStartFormat="%s:\n %.3f secs\n" PreviewLengthFormat="%s:\n %.3f secs\n" +FadeInPreview=0 +FadeOutPreview=1.5 + [ScreenPracticeMenu] Fallback="ScreenEditMenu" Class="ScreenEditMenu" diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 3efd3010cc..9dbd2c59c7 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -1004,6 +1004,9 @@ void ScreenEdit::PlayTicks() m_GameplayAssist.PlayTicks( m_Player->GetNoteData(), m_Player->GetPlayerState() ); } +static ThemeMetric FADE_IN_PREVIEW("ScreenEdit", "FadeInPreview"); +static ThemeMetric FADE_OUT_PREVIEW("ScreenEdit", "FadeOutPreview"); + void ScreenEdit::PlayPreviewMusic() { SOUND->StopMusic(); @@ -1013,8 +1016,8 @@ void ScreenEdit::PlayPreviewMusic() false, m_pSong->m_fMusicSampleStartSeconds, m_pSong->m_fMusicSampleLengthSeconds, - 0.0f, - 1.5f ); + FADE_IN_PREVIEW, + FADE_OUT_PREVIEW ); } void ScreenEdit::MakeFilteredMenuDef( const MenuDef* pDef, MenuDef &menu )