Added medley-countdown, ref #3 TODO: Fix ugly big numbers...
This commit is contained in:
1 parent
aeaa38cf22
commit
c44c4de339
3 files changed
+73
-2
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<ScreenSing>
|
<ScreenSing>
|
||||||
<ScreenVersion>6</ScreenVersion>
|
<ScreenVersion>7</ScreenVersion>
|
||||||
<Background1>
|
<Background1>
|
||||||
<!--<Type>: Background type: None, Color, Texture, Video-->
|
<!--<Type>: Background type: None, Color, Texture, Video-->
|
||||||
<Type>None</Type>
|
<Type>None</Type>
|
||||||
@@ -988,6 +988,36 @@
|
|||||||
<!-- <Space>: Reflection Space-->
|
<!-- <Space>: Reflection Space-->
|
||||||
<!-- <Height>: Reflection Height-->
|
<!-- <Height>: Reflection Height-->
|
||||||
</TextSongName>
|
</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>
|
<TextTime>
|
||||||
<!--<X>, <Y>: Text position-->
|
<!--<X>, <Y>: Text position-->
|
||||||
<X>1214</X>
|
<X>1214</X>
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
ScreenSing
|
ScreenSing
|
||||||
|
|
||||||
|
+++++++++
|
||||||
|
Version 7
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<TextMedleyCountdown> !text-position and size will be overwritten by vocaluxe!
|
||||||
|
|
||||||
+++++++++
|
+++++++++
|
||||||
Version 6
|
Version 6
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace Vocaluxe.Screens
|
|||||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||||
protected override int _ScreenVersion
|
protected override int _ScreenVersion
|
||||||
{
|
{
|
||||||
get { return 6; }
|
get { return 7; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private struct STimeRect
|
private struct STimeRect
|
||||||
@@ -31,6 +31,7 @@ namespace Vocaluxe.Screens
|
|||||||
private const string _TextPause = "TextPause";
|
private const string _TextPause = "TextPause";
|
||||||
private const string _TextDuetName1 = "TextDuetName1";
|
private const string _TextDuetName1 = "TextDuetName1";
|
||||||
private const string _TextDuetName2 = "TextDuetName2";
|
private const string _TextDuetName2 = "TextDuetName2";
|
||||||
|
private const string _TextMedleyCountdown = "TextMedleyCountdown";
|
||||||
private string[,] _TextScores;
|
private string[,] _TextScores;
|
||||||
private string[,] _TextNames;
|
private string[,] _TextNames;
|
||||||
|
|
||||||
@@ -105,6 +106,7 @@ namespace Vocaluxe.Screens
|
|||||||
texts.Add(_TextPause);
|
texts.Add(_TextPause);
|
||||||
texts.Add(_TextDuetName1);
|
texts.Add(_TextDuetName1);
|
||||||
texts.Add(_TextDuetName2);
|
texts.Add(_TextDuetName2);
|
||||||
|
texts.Add(_TextMedleyCountdown);
|
||||||
_BuildTextStrings(ref texts);
|
_BuildTextStrings(ref texts);
|
||||||
_ThemeTexts = texts.ToArray();
|
_ThemeTexts = texts.ToArray();
|
||||||
|
|
||||||
@@ -435,6 +437,8 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
if (_Active)
|
if (_Active)
|
||||||
{
|
{
|
||||||
|
_UpdateMedleyCountdown();
|
||||||
|
|
||||||
if (_CurrentVideo != -1 && CConfig.VideosInSongs == EOffOn.TR_CONFIG_ON && !_Webcam)
|
if (_CurrentVideo != -1 && CConfig.VideosInSongs == EOffOn.TR_CONFIG_ON && !_Webcam)
|
||||||
{
|
{
|
||||||
RectangleF bounds = new RectangleF(0, 0, CSettings.RenderW, CSettings.RenderH);
|
RectangleF bounds = new RectangleF(0, 0, CSettings.RenderW, CSettings.RenderH);
|
||||||
@@ -499,6 +503,9 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
_DrawLyricHelper();
|
_DrawLyricHelper();
|
||||||
|
|
||||||
|
if (CGame.GameMode == EGameMode.TR_GAMEMODE_MEDLEY)
|
||||||
|
Texts[_TextMedleyCountdown].Draw();
|
||||||
|
|
||||||
if (_Pause)
|
if (_Pause)
|
||||||
{
|
{
|
||||||
Statics[_StaticPauseBG].ForceDraw();
|
Statics[_StaticPauseBG].ForceDraw();
|
||||||
@@ -936,6 +943,34 @@ namespace Vocaluxe.Screens
|
|||||||
Statics[_StaticLyricHelperDuet].Alpha = 0f;
|
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)
|
||||||
|
{
|
||||||
|
Texts[_TextMedleyCountdown].Visible = true;
|
||||||
|
float timeDiff = timeToFirstMedleyNote - currentTime + 1;
|
||||||
|
double t = timeDiff - Math.Truncate(timeDiff);
|
||||||
|
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;
|
||||||
|
Texts[_TextMedleyCountdown].Text = Math.Round((decimal)(timeDiff - t)).ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Texts[_TextMedleyCountdown].Visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void _DrawLyricHelper()
|
private void _DrawLyricHelper()
|
||||||
{
|
{
|
||||||
if (_FadeOut)
|
if (_FadeOut)
|
||||||
|
|||||||
Reference in new issue
Block a user