diff --git a/Output/CreditsRessourcesDB.sqlite b/Output/CreditsRessourcesDB.sqlite index 3f960232..5701709f 100644 Binary files a/Output/CreditsRessourcesDB.sqlite and b/Output/CreditsRessourcesDB.sqlite differ diff --git a/Output/Themes/Ambient/Screens/ScreenSing.xml b/Output/Themes/Ambient/Screens/ScreenSing.xml index e5c7c0bf..f42d5a99 100644 --- a/Output/Themes/Ambient/Screens/ScreenSing.xml +++ b/Output/Themes/Ambient/Screens/ScreenSing.xml @@ -1,7 +1,7 @@  - 6 + 7 None @@ -988,6 +988,36 @@ + + + 640 + 18 + + -1,00 + + 32 + + + + + TextColor + + + TextSColor + + Left + + Center + + + + Outline + + + + + + 1214 @@ -2771,4 +2801,4 @@ - \ No newline at end of file + diff --git a/Output/Themes/Changelog/Changelog_ScreenSing.txt b/Output/Themes/Changelog/Changelog_ScreenSing.txt index 85b859da..51b97fd8 100644 --- a/Output/Themes/Changelog/Changelog_ScreenSing.txt +++ b/Output/Themes/Changelog/Changelog_ScreenSing.txt @@ -1,5 +1,11 @@ ScreenSing ++++++++++ +Version 7 + +Add: + !text-position and size will be overwritten by vocaluxe! + +++++++++ Version 6 diff --git a/Vocaluxe/Base/CProfiles.cs b/Vocaluxe/Base/CProfiles.cs index e45190a2..5641f23e 100644 --- a/Vocaluxe/Base/CProfiles.cs +++ b/Vocaluxe/Base/CProfiles.cs @@ -253,15 +253,32 @@ namespace Vocaluxe.Base return; if (_Profiles[profileID].ProfileFile == "") return; - try - { - File.Delete(_Profiles[profileID].ProfileFile); - _Profiles.RemoveAt(profileID); - } - catch (Exception) - { - CLog.LogError("Can't delete Profile File " + _Profiles[profileID].ProfileFile + ".xml"); - } + try + { + //Check if profile saved in config + for (int i = 0; i < CConfig.Players.Length; i++) + { + if (CConfig.Players[i] == _Profiles[profileID].ProfileFile) + { + CConfig.Players[i] = string.Empty; + CConfig.SaveConfig(); + } + } + File.Delete(_Profiles[profileID].ProfileFile); + _Profiles.RemoveAt(profileID); + //Check if profile is selected in game + for (int i = 0; i < CGame.Players.Length; i++) + { + if (CGame.Players[i].ProfileID > profileID) + CGame.Players[i].ProfileID--; + else if (CGame.Players[i].ProfileID == profileID) + CGame.Players[i].ProfileID = -1; + } + } + catch (Exception) + { + CLog.LogError("Can't delete Profile File " + _Profiles[profileID].ProfileFile + ".xml"); + } } private static void _SortProfilesByName() diff --git a/Vocaluxe/Screens/CScreenCredits.cs b/Vocaluxe/Screens/CScreenCredits.cs index 2105392e..b37fdeb3 100644 --- a/Vocaluxe/Screens/CScreenCredits.cs +++ b/Vocaluxe/Screens/CScreenCredits.cs @@ -134,6 +134,7 @@ namespace Vocaluxe.Screens private STexture _TexNameBrunzel; private STexture _TexNameDarkice; private STexture _TexNameFlokuep; + private STexture _TexNameFlamefire; private STexture _TexNameMesand; private STexture _TexNameBohning; private STexture _TexNameBabene03; @@ -193,6 +194,7 @@ namespace Vocaluxe.Screens CDataBase.GetCreditsRessource("brunzel.png", ref _TexNameBrunzel); CDataBase.GetCreditsRessource("Darkice.png", ref _TexNameDarkice); CDataBase.GetCreditsRessource("flokuep.png", ref _TexNameFlokuep); + CDataBase.GetCreditsRessource("flamefire.png", ref _TexNameFlamefire); CDataBase.GetCreditsRessource("bohning.png", ref _TexNameBohning); CDataBase.GetCreditsRessource("mesand.png", ref _TexNameMesand); CDataBase.GetCreditsRessource("babene03.png", ref _TexNameBabene03); @@ -328,6 +330,7 @@ namespace Vocaluxe.Screens _AddNewCreditName(_TexNameBrunzel, 502, 29, true); _AddNewCreditName(_TexNameDarkice, 360, 55, true); _AddNewCreditName(_TexNameFlokuep, 214, 14, true); + _AddNewCreditName(_TexNameFlamefire, 496, 46, true); _AddNewCreditName(_TexNameBohning, 383, 54, false); _AddNewCreditName(_TexNameMesand, 525, 13, false); _AddNewCreditName(_TexNameBabene03, 33, 26, false); diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index ea580d15..133885ab 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -564,14 +564,15 @@ namespace Vocaluxe.Screens for (int i = 0; i < CSettings.MaxNumPlayer; i++) { - //Update texture and name - if (CConfig.Players[i] != "") + if (CProfiles.IsProfileIDValid(CGame.Players[i].ProfileID)) + { + _Statics[_StaticPlayerAvatar[i]].Texture = CProfiles.Profiles[CGame.Players[i].ProfileID].Avatar.Texture; + _Texts[_TextPlayer[i]].Text = CProfiles.GetPlayerName(CGame.Players[i].ProfileID); + } + else { - if (CProfiles.IsProfileIDValid(CGame.Players[i].ProfileID)) - { - _Statics[_StaticPlayerAvatar[i]].Texture = CProfiles.Profiles[CGame.Players[i].ProfileID].Avatar.Texture; - _Texts[_TextPlayer[i]].Text = CProfiles.GetPlayerName(CGame.Players[i].ProfileID); - } + _Statics[_StaticPlayerAvatar[i]].Texture = _OriginalPlayerAvatarTextures[i]; + _Texts[_TextPlayer[i]].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + (i + 1).ToString(); } if (CGame.GetNumSongs() == 1 && CGame.GetSong(1).IsDuet) { diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 92a1665b..a7bad433 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -35,7 +35,7 @@ namespace Vocaluxe.Screens // Version number for theme files. Increment it, if you've changed something on the theme files! protected override int _ScreenVersion { - get { return 6; } + get { return 7; } } private struct STimeRect @@ -50,6 +50,7 @@ namespace Vocaluxe.Screens private const string _TextPause = "TextPause"; private const string _TextDuetName1 = "TextDuetName1"; private const string _TextDuetName2 = "TextDuetName2"; + private const string _TextMedleyCountdown = "TextMedleyCountdown"; private string[,] _TextScores; private string[,] _TextNames; @@ -118,8 +119,8 @@ namespace Vocaluxe.Screens { base.Init(); - List texts = new List {_TextSongName, _TextTime, _TextPause, _TextDuetName1, _TextDuetName2}; - _BuildTextStrings(ref texts); + List texts = new List {_TextSongName, _TextTime, _TextPause, _TextDuetName1, _TextDuetName2, _TextMedleyCountdown}; + _BuildTextStrings(texts); _ThemeTexts = texts.ToArray(); List statics = new List @@ -448,6 +449,8 @@ namespace Vocaluxe.Screens { if (_Active) { + _UpdateMedleyCountdown(); + if (_CurrentVideo != -1 && CConfig.VideosInSongs == EOffOn.TR_CONFIG_ON && !_Webcam) { RectangleF bounds = new RectangleF(0, 0, CSettings.RenderW, CSettings.RenderH); @@ -512,6 +515,9 @@ namespace Vocaluxe.Screens _DrawLyricHelper(); + if (CGame.GameMode == EGameMode.TR_GAMEMODE_MEDLEY) + _Texts[_TextMedleyCountdown].Draw(); + if (_Pause) { _Statics[_StaticPauseBG].ForceDraw(); @@ -842,7 +848,7 @@ namespace Vocaluxe.Screens } } - private void _BuildTextStrings(ref List texts) + private void _BuildTextStrings(List texts) { _TextScores = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer]; _TextNames = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer]; @@ -939,6 +945,34 @@ namespace Vocaluxe.Screens _Statics[_StaticLyricHelperDuet].Alpha = 0f; } + private void _UpdateMedleyCountdown() + { + if (CGame.GetSong() != null) + { + CSong song = CGame.GetSong(); + float currentTime = _CurrentTime - song.Start; + float timeToFirstMedleyNote = (CGame.GetTimeFromBeats(song.Medley.StartBeat, song.BPM) + song.Gap - song.Start); + if (currentTime < timeToFirstMedleyNote && CGame.GameMode == EGameMode.TR_GAMEMODE_MEDLEY) + { + float timeDiff = timeToFirstMedleyNote - currentTime + 1; + double t = timeDiff - Math.Truncate(timeDiff); + _Texts[_TextMedleyCountdown].Visible = true; + _Texts[_TextMedleyCountdown].Text = Math.Round((decimal)(timeDiff - t)).ToString(); + float h = (float)(t * CSettings.RenderH); + float w = CFonts.GetTextBounds(_Texts[_TextMedleyCountdown], h).Width; + float x = CSettings.RenderW / 2 - w / 2; + float y = CSettings.RenderH / 2 - h / 2 ; + _Texts[_TextMedleyCountdown].X = x; + _Texts[_TextMedleyCountdown].Y = y; + _Texts[_TextMedleyCountdown].Height = h; + } + else + { + _Texts[_TextMedleyCountdown].Visible = false; + } + } + } + private void _DrawLyricHelper() { if (_FadeOut)