Added more lyric-position-options.

TRANSIFEX:
Add: TR_SCREENOLYRICS_POSITION, TR_CONFIG_LYRICSPOSITION_BOTTOM, TR_CONFIG_LYRICSPOSITION_TOP, TR_CONFIG_LYRICSPOSITION_BOTH, TR_CONFIG_LYRICSPOSITION_DYNAMIC
Remove: TR_SCREENOLYRICS_ONTOP
This commit is contained in:
Florian Küpper committed 2013-04-29 09:24:28 +02:00
1 parent 3884632772
commit 4aa94e188c
6 files changed
+52 -28

No files matched your search

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<ScreenOptionsLyrics>
<ScreenVersion>1</ScreenVersion>
<ScreenVersion>2</ScreenVersion>
<Background1>
<!--<Type>: Background type: None, Color, Texture, Video-->
<Type>Video</Type>
@@ -111,7 +111,7 @@
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENOLYRICS_ONTOP</Text>
<Text>TR_SCREENOLYRICS_POSITION</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
@@ -240,7 +240,7 @@
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>4</NumVisible>
</SelectSlideLyricStyle>
<SelectSlideLyricsOnTop>
<SelectSlideLyricsPosition>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
<!--<SkinArrowLeft>: Texture name of left arrow-->
@@ -306,6 +306,6 @@
<TextStyle>Bold</TextStyle>
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>2</NumVisible>
</SelectSlideLyricsOnTop>
</SelectSlideLyricsPosition>
</ScreenOptionsLyrics>
</root>
</root>
@@ -1,5 +1,7 @@
ScreenOptionsSound
++++++++++
Version 2:
Rename <SelectSlideLyricsOnTop> to <SelectSlideLyricsPosition>
++++++++++
Version 1:
+4 -4
View File
@@ -93,7 +93,7 @@ namespace Vocaluxe.Base
public static int NumPlayer = 2;
public static EOffOn Tabs = EOffOn.TR_CONFIG_OFF;
public static string Language = "English";
public static EOffOn LyricsOnTop = EOffOn.TR_CONFIG_OFF;
public static ELyricsPosition LyricsPosition = ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM;
public static readonly string[] Players = new string[CSettings.MaxNumPlayer];
public static float MinLineBreakTime = 0.1f; //Minimum time to show the text before it is (to be) sung (if possible)
@@ -221,7 +221,7 @@ namespace Vocaluxe.Base
xmlReader.TryGetIntValue("//root/Game/NumPlayer", ref NumPlayer);
xmlReader.TryGetEnumValue("//root/Game/Tabs", ref Tabs);
xmlReader.GetValue("//root/Game/Language", out Language, Language);
xmlReader.TryGetEnumValue("//root/Game/LyricsOnTop", ref LyricsOnTop);
xmlReader.TryGetEnumValue("//root/Game/LyricsOnTop", ref LyricsPosition);
xmlReader.TryGetFloatValue("//root/Game/MinLineBreakTime", ref MinLineBreakTime);
if ((ScoreAnimationTime > 0 && ScoreAnimationTime < 1) || ScoreAnimationTime < 0)
@@ -461,8 +461,8 @@ namespace Vocaluxe.Base
writer.WriteComment("Order songs in tabs: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("Tabs", Enum.GetName(typeof(EOffOn), Tabs));
writer.WriteComment("Lyrics also on Top of screen: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("LyricsOnTop", Enum.GetName(typeof(EOffOn), LyricsOnTop));
writer.WriteComment("Lyrics also on Top of screen: " + CHelper.ListStrings(Enum.GetNames(typeof(ELyricsPosition))));
writer.WriteElementString("LyricsOnTop", Enum.GetName(typeof(ELyricsPosition), LyricsPosition));
writer.WriteComment("MinLineBreakTime: Value >= 0 in s. Minimum time the text is shown before it is to be sung");
writer.WriteElementString("MinLineBreakTime", MinLineBreakTime.ToString());
+5 -5
View File
@@ -28,11 +28,11 @@ 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 1; }
get { return 2; }
}
private const string _SelectSlideLyricStyle = "SelectSlideLyricStyle";
private const string _SelectSlideLyricsOnTop = "SelectSlideLyricsOnTop";
private const string _SelectSlideLyricsPosition = "SelectSlideLyricsPosition";
private const string _ButtonExit = "ButtonExit";
@@ -41,14 +41,14 @@ namespace Vocaluxe.Screens
base.Init();
_ThemeButtons = new string[] {_ButtonExit};
_ThemeSelectSlides = new string[] {_SelectSlideLyricStyle, _SelectSlideLyricsOnTop};
_ThemeSelectSlides = new string[] {_SelectSlideLyricStyle, _SelectSlideLyricsPosition};
}
public override void LoadTheme(string xmlPath)
{
base.LoadTheme(xmlPath);
_SelectSlides[_SelectSlideLyricStyle].SetValues<ELyricStyle>((int)CConfig.LyricStyle);
_SelectSlides[_SelectSlideLyricsOnTop].SetValues<EOffOn>((int)CConfig.LyricsOnTop);
_SelectSlides[_SelectSlideLyricsPosition].SetValues<ELyricsPosition>((int)CConfig.LyricsPosition);
}
public override bool HandleInput(SKeyEvent keyEvent)
@@ -122,7 +122,7 @@ namespace Vocaluxe.Screens
private void _SaveConfig()
{
CConfig.LyricsOnTop = (EOffOn)_SelectSlides[_SelectSlideLyricsOnTop].Selection;
CConfig.LyricsPosition = (ELyricsPosition)_SelectSlides[_SelectSlideLyricsPosition].Selection;
CConfig.LyricStyle = (ELyricStyle)_SelectSlides[_SelectSlideLyricStyle].Selection;
CConfig.SaveConfig();
}
+27 -13
View File
@@ -649,6 +649,7 @@ namespace Vocaluxe.Screens
}
}
_SetDuetLyricsVisibility(song.IsDuet);
_SetNormalLyricsVisibility();
for (int p = 0; p < CGame.NumPlayer; p++)
_NoteLines[p] = _SingNotes[_SingBars].AddPlayer(_SingNotes[_SingBars].BarPos[p, CGame.NumPlayer - 1], CTheme.GetPlayerColor(p + 1), p);
@@ -688,13 +689,23 @@ namespace Vocaluxe.Screens
}
else
{
bool lyricsOnTop = (CGame.NumPlayer != 1) && CConfig.LyricsOnTop == EOffOn.TR_CONFIG_ON;
bool lyricsOnTop = CConfig.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_TOP
|| CConfig.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTH
|| (CConfig.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_DYNAMIC && (CGame.NumPlayer > 2 && CGame.NumPlayer != 4));
_Lyrics[_LyricMainTop].Visible = lyricsOnTop;
_Lyrics[_LyricSubTop].Visible = lyricsOnTop;
_Statics[_StaticLyricsTop].Visible = lyricsOnTop;
}
}
private void _SetNormalLyricsVisibility()
{
bool visible = CConfig.LyricsPosition != ELyricsPosition.TR_CONFIG_LYRICSPOSITION_TOP;
_Lyrics[_LyricMain].Visible = visible;
_Lyrics[_LyricSub].Visible = visible;
_Statics[_StaticLyrics].Visible = visible;
}
private void _StartSong()
{
_PrepareTimeLine();
@@ -999,27 +1010,30 @@ namespace Vocaluxe.Screens
if (time > totaltime)
time = totaltime;
SRectF rect = _Statics[_StaticLyricHelper].Rect;
SColorF color = new SColorF(
_Statics[_StaticLyricHelper].Color.R,
_Statics[_StaticLyricHelper].Color.G,
_Statics[_StaticLyricHelper].Color.B,
_Statics[_StaticLyricHelper].Color.A * _Statics[_StaticLyricHelper].Alpha * alpha);
if (_Statics[_StaticLyrics].Visible)
{
SRectF rect = _Statics[_StaticLyricHelper].Rect;
SColorF color = new SColorF(
_Statics[_StaticLyricHelper].Color.R,
_Statics[_StaticLyricHelper].Color.G,
_Statics[_StaticLyricHelper].Color.B,
_Statics[_StaticLyricHelper].Color.A * _Statics[_StaticLyricHelper].Alpha * alpha);
float distance = _Lyrics[_LyricMain].GetCurrentLyricPosX() - rect.X - rect.W;
CDraw.DrawTexture(_Statics[_StaticLyricHelper].Texture,
new SRectF(rect.X + distance * (1f - time / totaltime), rect.Y, rect.W, rect.H, rect.Z), color);
float distance = _Lyrics[_LyricMain].GetCurrentLyricPosX() - rect.X - rect.W;
CDraw.DrawTexture(_Statics[_StaticLyricHelper].Texture,
new SRectF(rect.X + distance * (1f - time / totaltime), rect.Y, rect.W, rect.H, rect.Z), color);
}
if (_Statics[_StaticLyricsTop].Visible)
{
rect = _Statics[_StaticLyricHelperTop].Rect;
color = new SColorF(
SRectF rect = _Statics[_StaticLyricHelperTop].Rect;
SColorF color = new SColorF(
_Statics[_StaticLyricHelperTop].Color.R,
_Statics[_StaticLyricHelperTop].Color.G,
_Statics[_StaticLyricHelperTop].Color.B,
_Statics[_StaticLyricHelperTop].Color.A * _Statics[_StaticLyricHelper].Alpha * alpha);
distance = _Lyrics[_LyricMainTop].GetCurrentLyricPosX() - rect.X - rect.W;
float distance = _Lyrics[_LyricMainTop].GetCurrentLyricPosX() - rect.X - rect.W;
CDraw.DrawTexture(_Statics[_StaticLyricHelperTop].Texture,
new SRectF(rect.X + distance * (1f - time / totaltime), rect.Y, rect.W, rect.H, rect.Z), color);
}
+8
View File
@@ -272,6 +272,14 @@ namespace VocaluxeLib.Menu
// ReSharper restore InconsistentNaming
}
public enum ELyricsPosition
{
TR_CONFIG_LYRICSPOSITION_BOTTOM,
TR_CONFIG_LYRICSPOSITION_TOP,
TR_CONFIG_LYRICSPOSITION_BOTH,
TR_CONFIG_LYRICSPOSITION_DYNAMIC
}
public enum ELyricStyle
{
Fill,