Merge branch 'develop' of git://github.com/flokuep/Vocaluxe into develop
Conflicts: Vocaluxe/Base/CConfig.cs Vocaluxe/Base/CProfiles.cs Vocaluxe/Screens/CScreenNames.cs Vocaluxe/Screens/CScreenSing.cs
This commit is contained in:
commit
438068cf5d
7 files changed
+113
-22
No files matched your search
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<ScreenSing>
|
||||
<ScreenVersion>6</ScreenVersion>
|
||||
<ScreenVersion>7</ScreenVersion>
|
||||
<Background1>
|
||||
<!--<Type>: Background type: None, Color, Texture, Video-->
|
||||
<Type>None</Type>
|
||||
@@ -988,6 +988,36 @@
|
||||
<!-- <Space>: Reflection Space-->
|
||||
<!-- <Height>: Reflection Height-->
|
||||
</TextSongName>
|
||||
<TextMedleyCountdown>
|
||||
<!--<X>, <Y>: Text position-->
|
||||
<X>640</X>
|
||||
<Y>18</Y>
|
||||
<!--<Z>: Text position-->
|
||||
<Z>-1,00</Z>
|
||||
<!--<H>: Text height-->
|
||||
<H>32</H>
|
||||
<!--<MaxW>: Maximum text width (if exists)-->
|
||||
<MaxW />
|
||||
<!--<Color>: Text color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>TextColor</Color>
|
||||
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
|
||||
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
|
||||
<SColor>TextSColor</SColor>
|
||||
<!--<Align>: Text align horizontal: Left, Center, Right-->
|
||||
<Align>Left</Align>
|
||||
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
|
||||
<HAlign>Center</HAlign>
|
||||
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
|
||||
<Style>Bold</Style>
|
||||
<!--<Font>: Text font name-->
|
||||
<Font>Outline</Font>
|
||||
<!--<Text>: Nothing or translation tag-->
|
||||
<Text />
|
||||
<!--<Reflection> If exists:-->
|
||||
<!-- <Space>: Reflection Space-->
|
||||
<!-- <Height>: Reflection Height-->
|
||||
</TextMedleyCountdown>
|
||||
<TextTime>
|
||||
<!--<X>, <Y>: Text position-->
|
||||
<X>1214</X>
|
||||
@@ -2771,4 +2801,4 @@
|
||||
</BarPositions>
|
||||
</SingBars>
|
||||
</ScreenSing>
|
||||
</root>
|
||||
</root>
|
||||
@@ -1,5 +1,11 @@
|
||||
ScreenSing
|
||||
|
||||
+++++++++
|
||||
Version 7
|
||||
|
||||
Add:
|
||||
<TextMedleyCountdown> !text-position and size will be overwritten by vocaluxe!
|
||||
|
||||
+++++++++
|
||||
Version 6
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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<string> texts = new List<string> {_TextSongName, _TextTime, _TextPause, _TextDuetName1, _TextDuetName2};
|
||||
_BuildTextStrings(ref texts);
|
||||
List<string> texts = new List<string> {_TextSongName, _TextTime, _TextPause, _TextDuetName1, _TextDuetName2, _TextMedleyCountdown};
|
||||
_BuildTextStrings(texts);
|
||||
_ThemeTexts = texts.ToArray();
|
||||
|
||||
List<string> statics = new List<string>
|
||||
@@ -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<string> texts)
|
||||
private void _BuildTextStrings(List<string> 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)
|
||||
|
||||
Reference in new issue
Block a user