diff options
author | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-10-15 22:16:48 +0000 |
---|---|---|
committer | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-10-15 22:16:48 +0000 |
commit | 85bfeda53c2ace946d89a5edcb7c01a8a5ad7a10 (patch) | |
tree | 89340bf3bcf31ff8037427b3fac5226f4605d343 /medley_new/src/base | |
parent | a1db18bc7cce48620534c2d6a0f9589d1dd8a95e (diff) | |
download | usdx-85bfeda53c2ace946d89a5edcb7c01a8a5ad7a10.tar.gz usdx-85bfeda53c2ace946d89a5edcb7c01a8a5ad7a10.tar.xz usdx-85bfeda53c2ace946d89a5edcb7c01a8a5ad7a10.zip |
- medley songs are startable now (press S in songscreen)
todo: medley fadeout in screensing, edit screenscore and themes
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2668 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | medley_new/src/base/UDraw.pas | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/medley_new/src/base/UDraw.pas b/medley_new/src/base/UDraw.pas index 5bec3eab..3ee2f9e7 100644 --- a/medley_new/src/base/UDraw.pas +++ b/medley_new/src/base/UDraw.pas @@ -93,6 +93,7 @@ uses UMusic, URecord, UScreenSing, + USong, UTexture; procedure SingDrawBackground; @@ -1115,6 +1116,8 @@ var width, height: real; LyricsProgress: real; CurLyricsTime: real; + TotalTime: real; + begin x := Theme.Sing.StaticTimeProgress.x; y := Theme.Sing.StaticTimeProgress.y; @@ -1135,11 +1138,19 @@ begin glTexCoord2f(0, 0); glVertex2f(x, y); - CurLyricsTime := LyricsState.GetCurrentTime(); + if (ScreenSong.Mode = smMedley) then + begin + CurLyricsTime := LyricsState.GetCurrentTime() - ScreenSing.MedleyStart; + TotalTime := ScreenSing.MedleyEnd - ScreenSing.MedleyStart; + end else + begin + CurLyricsTime := LyricsState.GetCurrentTime(); + TotalTime := LyricsState.TotalTime; + end; if (CurLyricsTime > 0) and (LyricsState.TotalTime > 0) then begin - LyricsProgress := CurLyricsTime / LyricsState.TotalTime; + LyricsProgress := CurLyricsTime / TotalTime; // avoid that the bar "overflows" for inaccurate song lengths if (LyricsProgress > 1.0) then LyricsProgress := 1.0; |