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