From d511dee312e1bd1dd7e146b9cf1f4e2e4a3e1c79 Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Mon, 18 Oct 2010 15:40:32 +0000 Subject: added song name in medley mode (singscreen) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2679 b956fd51-792f-4845-bead-9b4dfca2ff2c --- medley_new/src/screens/UScreenSing.pas | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'medley_new/src/screens') diff --git a/medley_new/src/screens/UScreenSing.pas b/medley_new/src/screens/UScreenSing.pas index f4984386..a0e1c794 100644 --- a/medley_new/src/screens/UScreenSing.pas +++ b/medley_new/src/screens/UScreenSing.pas @@ -123,6 +123,9 @@ type StaticPausePopup: integer; + SongNameStatic: integer; + SongNameText: integer; + Tex_Background: TTexture; FadeOut: boolean; Lyrics: TLyricEngine; @@ -370,6 +373,9 @@ begin fLyricsSync := TLyricsSyncSource.Create(); fMusicSync := TMusicSyncSource.Create(); + SongNameStatic := AddStatic(Theme.Sing.StaticSongName);; + SongNameText := AddText(Theme.Sing.TextSongName); + eSongLoaded := THookableEvent.Create('ScreenSing.SongLoaded'); ClearSettings; @@ -411,6 +417,9 @@ begin end else fTimebarMode := tbmCurrent; + Statics[SongNameStatic].Visible := false; + Text[SongNameText].Visible := false; + case PlayersPlay of 1: begin @@ -761,11 +770,10 @@ begin begin CurrentSong.SetMedleyMode(); - (* TODO: + Text[SongNameText].Text := IntToStr(PlaylistMedley.CurrentMedleySong) + '/' + IntToStr(PlaylistMedley.NumMedleySongs) + ': ' + CurrentSong.Artist + ' - ' + CurrentSong.Title; - *) //medley start and end timestamps StartNote := FindNote(CurrentSong.Medley.StartBeat - round(CurrentSong.BPM[0].BPM*CurrentSong.Medley.FadeIn_time/60)); @@ -1439,6 +1447,9 @@ var begin if (AudioPlayback.Position < GetTimeFromBeat(CurrentSong.Medley.StartBeat)) then begin + Statics[SongNameStatic].Visible := true; + Text[SongNameText].Visible := true; + timeDiff := GetTimeFromBeat(CurrentSong.Medley.StartBeat)-AudioPlayback.Position+1; t := frac(timeDiff); @@ -1453,6 +1464,10 @@ begin SetFontPos (RenderW/2-w/2, RenderH/2-h/2); glPrint(PChar(CountDownText)); + end else + begin + Statics[SongNameStatic].Visible := false; + Text[SongNameText].Visible := false; end; end; -- cgit v1.2.3