diff options
author | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2013-02-23 15:47:29 +0000 |
---|---|---|
committer | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2013-02-23 15:47:29 +0000 |
commit | 09cb93c06202febc160b644b384a8d7d29978c04 (patch) | |
tree | b16975f0c3e26ce1d2cdb793f6edaa8c824fb977 /src/screens | |
parent | fb364dd193945e9027df807b4648e1f325b43d35 (diff) | |
download | usdx-09cb93c06202febc160b644b384a8d7d29978c04.tar.gz usdx-09cb93c06202febc160b644b384a8d7d29978c04.tar.xz usdx-09cb93c06202febc160b644b384a8d7d29978c04.zip |
medley mod: Themes modifications. This is considered the last part of the medley mod.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2946 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | src/screens/UScreenScore.pas | 13 | ||||
-rw-r--r-- | src/screens/UScreenSing.pas | 27 | ||||
-rw-r--r-- | src/screens/UScreenSong.pas | 27 |
3 files changed, 46 insertions, 21 deletions
diff --git a/src/screens/UScreenScore.pas b/src/screens/UScreenScore.pas index 4b7332b4..82b73ea2 100644 --- a/src/screens/UScreenScore.pas +++ b/src/screens/UScreenScore.pas @@ -168,6 +168,8 @@ type TextGolden_ActualValue: array[1..6] of integer; ActualRound: integer; + StaticNavigate: integer; + TextNavigate: integer; procedure RefreshTexts; procedure ResetScores; @@ -577,6 +579,9 @@ begin aPlayerScoreScreenTextures[Player].Player_Id_Box := Texture.GetTexture(Skin.GetTextureFileName('PlayerIDBox0' + IntToStr(Player)), Texture_Type_Transparent); end; + StaticNavigate := AddStatic(Theme.Score.StaticNavigate); + TextNavigate := AddText(Theme.Score.TextNavigate); + LoadSwapTextures; end; @@ -701,6 +706,14 @@ begin begin for P := 0 to PlayersPlay - 1 do Player[P] := PlaylistMedley.Stats[ActualRound].Player[P]; + + Statics[StaticNavigate].Visible := true; + Text[TextNavigate].Visible := true; + end + else + begin + Statics[StaticNavigate].Visible := false; + Text[TextNavigate].Visible := false; end; MapPlayersToPosition; diff --git a/src/screens/UScreenSing.pas b/src/screens/UScreenSing.pas index 13350511..581e22a0 100644 --- a/src/screens/UScreenSing.pas +++ b/src/screens/UScreenSing.pas @@ -123,6 +123,9 @@ type StaticPausePopup: integer; + SongNameStatic: integer; + SongNameText: integer; + Tex_Background: TTexture; FadeOut: boolean; Lyrics: TLyricEngine; @@ -142,6 +145,7 @@ type PlayerEnabled: integer; //< defines whether a player can score atm end; + procedure ClearSettings; procedure ApplySettings; //< applies changes of settings record procedure EndSong; @@ -370,6 +374,9 @@ begin fLyricsSync := TLyricsSyncSource.Create(); fMusicSync := TMusicSyncSource.Create(); + SongNameStatic := AddStatic(Theme.Sing.StaticSongName);; + SongNameText := AddText(Theme.Sing.TextSongName); + eSongLoaded := THookableEvent.Create('ScreenSing.SongLoaded'); ClearSettings; @@ -412,8 +419,8 @@ begin else fTimebarMode := tbmCurrent; - // prepare players - SetLength(Player, PlayersPlay); + Statics[SongNameStatic].Visible := false; + Text[SongNameText].Visible := false; case PlayersPlay of 1: @@ -768,11 +775,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)); MedleyStart := GetTimeFromBeat(Lines[0].Line[StartNote.line].Note[0].Start); @@ -1452,13 +1458,16 @@ var begin if AudioPlayback.Position < GetTimeFromBeat(CurrentSong.Medley.StartBeat) then begin - timeDiff := GetTimeFromBeat(CurrentSong.Medley.StartBeat)-AudioPlayback.Position+1; + Statics[SongNameStatic].Visible := true; + Text[SongNameText].Visible := true; + + timeDiff := GetTimeFromBeat(CurrentSong.Medley.StartBeat) - AudioPlayback.Position + 1; t := frac(timeDiff); glColor4f(0.15, 0.30, 0.6, t); h := 300 * t * ScreenH / RenderH; - SetFontStyle(ftBold); + SetFontStyle(ftBoldHighRes); SetFontItalic(false); SetFontSize(h); CountDownText := IntToStr(round(timeDiff - t)); @@ -1466,7 +1475,13 @@ 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; +end; end. diff --git a/src/screens/UScreenSong.pas b/src/screens/UScreenSong.pas index 7558a59b..50efd792 100644 --- a/src/screens/UScreenSong.pas +++ b/src/screens/UScreenSong.pas @@ -78,6 +78,10 @@ type //Video Icon Mod VideoIcon: cardinal; + //Medley Icons + MedleyIcon: cardinal; + CalcMedleyIcon: cardinal; + TextCat: integer; StaticCat: integer; @@ -425,13 +429,6 @@ begin Ord('S'): begin - Log.LogError('SDL_ModState: ' + inttostr(SDL_ModState)); - Log.LogError('KMOD_LSHIFT: ' + inttostr(KMOD_LSHIFT)); - Log.LogError('CatSongs.Song[Interaction].Medley.Source: ' + inttostr(ord(CatSongs.Song[Interaction].Medley.Source))); - Log.LogError('msCalculated: ' + inttostr(ord(msCalculated))); - Log.LogError('msTag: ' + inttostr(ord(msTag))); - Log.LogError('Mode: ' + inttostr(ord(Mode))); - Log.LogError('smNormal: ' + inttostr(ord(smNormal))); if //(SDL_ModState = KMOD_LSHIFT) and (CatSongs.Song[Interaction].Medley.Source >= msCalculated) and (Mode = smNormal) then StartMedley(0, msCalculated) @@ -441,14 +438,6 @@ begin Ord('D'): begin - Log.LogError('SDL_ModState: ' + inttostr(SDL_ModState)); - Log.LogError('KMOD_LSHIFT: ' + inttostr(KMOD_LSHIFT)); - Log.LogError('length(getVisibleMedleyArr(msCalculated)): ' + inttostr(length(getVisibleMedleyArr(msCalculated)))); - Log.LogError('msCalculated: ' + inttostr(ord(msCalculated))); - Log.LogError('msTag: ' + inttostr(ord(msTag))); - Log.LogError('Length(getVisibleMedleyArr(msTag)): ' + inttostr(Length(getVisibleMedleyArr(msTag)))); - Log.LogError('smNormal: ' + inttostr(ord(smNormal))); - Log.LogError('Mode: ' + inttostr(ord(Mode))); if (Mode = smNormal) and //(SDL_ModState = KMOD_LSHIFT) and (length(getVisibleMedleyArr(msCalculated)) > 0) then StartMedley(5, msCalculated) @@ -881,6 +870,10 @@ begin //Show Video Icon Mod VideoIcon := AddStatic(Theme.Song.VideoIcon); + //Medley Icons + MedleyIcon := AddStatic(Theme.Song.MedleyIcon); + CalcMedleyIcon := AddStatic(Theme.Song.CalculatedMedleyIcon); + //Party Mode StaticTeam1Joker1 := AddStatic(Theme.Song.StaticTeam1Joker1); StaticTeam1Joker2 := AddStatic(Theme.Song.StaticTeam1Joker2); @@ -1042,6 +1035,10 @@ begin // Set visibility of video icon Statics[VideoIcon].Visible := CatSongs.Song[Interaction].Video.IsSet; + // Set visibility of medley icons + Statics[MedleyIcon].Visible := (CatSongs.Song[Interaction].Medley.Source = msTag); + Statics[CalcMedleyIcon].Visible := (CatSongs.Song[Interaction].Medley.Source = msCalculated); + // Set texts Text[TextArtist].Text := CatSongs.Song[Interaction].Artist; Text[TextTitle].Text := CatSongs.Song[Interaction].Title; |