Merge pull request #9 from Vocaluxe/develop

Update branch
This commit is contained in:
Stefan authored and GitHub committed 2020-01-18 16:01:18 +01:00
commit de684a806d
24 files changed
+719 -115

No files matched your search

File renamed without changes.
+166
View File
@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<Info>
<Name>Genius Blue</Name>
<Folder>Genius</Folder>
<Author>Jiiniasu</Author>
</Info>
<!--Cover definitions when a category is missing a cover-->
<!--Possible types are: Default, Song, Artist, Letter, Edition, Genre, Language, Year, Decade, Date -->
<CoverGenerator Type="Default">
<Text>
<!--<Text>: Text to be shown, %TEXT% will be replaced by the category or song name-->
<Text>%TEXT%</Text>
<Font>
<Name>Normal</Name>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Size> Maximum size of the text in px-->
<Size>550</Size>
</Font>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>
<R>0.855</R>
<G>0.937</G>
<B>0.945</B>
<A>0.8</A>
</Color>
<!--<Margin>: Spacing of the text from the borders of the image in px-->
<Margin Default="24">
<Left>24</Left>
</Margin>
<!--<Indent>: Indentation of the text for multiple lines-->
<Indent>100</Indent>
</Text>
<BackgroundColor>
<R>1</R>
<G>1</G>
<B>1</B>
<A>1</A>
</BackgroundColor>
<!--<Image>: Background image for the cover-->
<Image>Cover.png</Image>
<!--<ImageAlpha>Alpha value of the image in case the first cover is shown(optional)-->
<ImageAlpha>1.0</ImageAlpha>
<!--<ShowFirstCover>Whether the first cover of a category should be shown(optional)-->
<ShowFirstCover>True</ShowFirstCover>
</CoverGenerator>
<CoverGenerator Type="Year">
<Text>
<!--<Text>: Text to be shown, %TEXT% will be replaced by the category or song name-->
<Text>%TEXT%</Text>
<Font>
<Name>Normal</Name>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Size> Maximum size of the text in px-->
<Size>550</Size>
</Font>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>
<R>0.855</R>
<G>0.937</G>
<B>0.945</B>
<A>0.8</A>
</Color>
<!--<Margin>: Spacing of the text from the borders of the image in px-->
<Margin Default="24">
<Top>-150</Top>
</Margin>
<!--<Indent>: Indentation of the text for multiple lines-->
<Indent>100</Indent>
</Text>
<BackgroundColor>
<R>1</R>
<G>1</G>
<B>1</B>
<A>1</A>
</BackgroundColor>
<!--<Image>: Background image for the cover-->
<Image>Cover.png</Image>
<!--<ImageAlpha>Alpha value of the image in case the first cover is shown(optional)-->
<ImageAlpha>1.0</ImageAlpha>
<!--<ShowFirstCover>Whether the first cover of a category should be shown(optional)-->
<ShowFirstCover>True</ShowFirstCover>
</CoverGenerator>
<CoverGenerator Type="Artist">
<Text>
<!--<Text>: Text to be shown, %TEXT% will be replaced by the category or song name-->
<Text>%TEXT%</Text>
<Font>
<Name>Normal</Name>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Size> Maximum size of the text in px-->
<Size>550</Size>
</Font>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>
<R>0.855</R>
<G>0.937</G>
<B>0.945</B>
<A>0.8</A>
</Color>
<!--<Margin>: Spacing of the text from the borders of the image in px-->
<Margin Default="24">
<Bottom>150</Bottom>
</Margin>
<!--<Indent>: Indentation of the text for multiple lines-->
<Indent>100</Indent>
</Text>
<BackgroundColor>
<R>1</R>
<G>1</G>
<B>1</B>
<A>1</A>
</BackgroundColor>
<!--<Image>: Background image for the cover-->
<Image>Cover.png</Image>
<!--<ImageAlpha>Alpha value of the image in case the first cover is shown(optional)-->
<ImageAlpha>1.0</ImageAlpha>
<!--<ShowFirstCover>Whether the first cover of a category should be shown(optional)-->
<ShowFirstCover>True</ShowFirstCover>
</CoverGenerator>
<CoverGenerator Type="Date">
<Text>
<!--<Text>: Text to be shown, %TEXT% will be replaced by the category or song name-->
<Text>%TEXT%</Text>
<Font>
<Name>Normal</Name>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Size> Maximum size of the text in px-->
<Size>120</Size>
</Font>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>
<R>0.855</R>
<G>0.937</G>
<B>0.945</B>
<A>0.8</A>
</Color>
<!--<Margin>: Spacing of the text from the borders of the image in px-->
<Margin Default="5">
<Top>-150</Top>
</Margin>
<!--<Indent>: Indentation of the text for multiple lines-->
<Indent>100</Indent>
</Text>
<BackgroundColor>
<R>1</R>
<G>1</G>
<B>1</B>
<A>1</A>
</BackgroundColor>
<!--<Image>: Background image for the cover-->
<Image>Cover.png</Image>
<!--<ImageAlpha>Alpha value of the image in case the first cover is shown(optional)-->
<ImageAlpha>1.0</ImageAlpha>
<!--<ShowFirstCover>Whether the first cover of a category should be shown(optional)-->
<ShowFirstCover>True</ShowFirstCover>
</CoverGenerator>
</root>
+166
View File
@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<Info>
<Name>Genius Red</Name>
<Folder>Genius</Folder>
<Author>Jiiniasu</Author>
</Info>
<!--Cover definitions when a category is missing a cover-->
<!--Possible types are: Default, Song, Artist, Letter, Edition, Genre, Language, Year, Decade, Date -->
<CoverGenerator Type="Default">
<Text>
<!--<Text>: Text to be shown, %TEXT% will be replaced by the category or song name-->
<Text>%TEXT%</Text>
<Font>
<Name>Normal</Name>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Size> Maximum size of the text in px-->
<Size>550</Size>
</Font>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>
<R>0.988</R>
<G>0.682</G>
<B>0.733</B>
<A>0.8</A>
</Color>
<!--<Margin>: Spacing of the text from the borders of the image in px-->
<Margin Default="24">
<Left>24</Left>
</Margin>
<!--<Indent>: Indentation of the text for multiple lines-->
<Indent>100</Indent>
</Text>
<BackgroundColor>
<R>1</R>
<G>1</G>
<B>1</B>
<A>1</A>
</BackgroundColor>
<!--<Image>: Background image for the cover-->
<Image>Cover.png</Image>
<!--<ImageAlpha>Alpha value of the image in case the first cover is shown(optional)-->
<ImageAlpha>1.0</ImageAlpha>
<!--<ShowFirstCover>Whether the first cover of a category should be shown(optional)-->
<ShowFirstCover>True</ShowFirstCover>
</CoverGenerator>
<CoverGenerator Type="Year">
<Text>
<!--<Text>: Text to be shown, %TEXT% will be replaced by the category or song name-->
<Text>%TEXT%</Text>
<Font>
<Name>Normal</Name>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Size> Maximum size of the text in px-->
<Size>550</Size>
</Font>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>
<R>0.988</R>
<G>0.682</G>
<B>0.733</B>
<A>0.8</A>
</Color>
<!--<Margin>: Spacing of the text from the borders of the image in px-->
<Margin Default="24">
<Top>-150</Top>
</Margin>
<!--<Indent>: Indentation of the text for multiple lines-->
<Indent>100</Indent>
</Text>
<BackgroundColor>
<R>1</R>
<G>1</G>
<B>1</B>
<A>1</A>
</BackgroundColor>
<!--<Image>: Background image for the cover-->
<Image>Cover.png</Image>
<!--<ImageAlpha>Alpha value of the image in case the first cover is shown(optional)-->
<ImageAlpha>1.0</ImageAlpha>
<!--<ShowFirstCover>Whether the first cover of a category should be shown(optional)-->
<ShowFirstCover>True</ShowFirstCover>
</CoverGenerator>
<CoverGenerator Type="Artist">
<Text>
<!--<Text>: Text to be shown, %TEXT% will be replaced by the category or song name-->
<Text>%TEXT%</Text>
<Font>
<Name>Normal</Name>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Size> Maximum size of the text in px-->
<Size>550</Size>
</Font>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>
<R>0.988</R>
<G>0.682</G>
<B>0.733</B>
<A>0.8</A>
</Color>
<!--<Margin>: Spacing of the text from the borders of the image in px-->
<Margin Default="24">
<Bottom>150</Bottom>
</Margin>
<!--<Indent>: Indentation of the text for multiple lines-->
<Indent>100</Indent>
</Text>
<BackgroundColor>
<R>1</R>
<G>1</G>
<B>1</B>
<A>1</A>
</BackgroundColor>
<!--<Image>: Background image for the cover-->
<Image>Cover.png</Image>
<!--<ImageAlpha>Alpha value of the image in case the first cover is shown(optional)-->
<ImageAlpha>1.0</ImageAlpha>
<!--<ShowFirstCover>Whether the first cover of a category should be shown(optional)-->
<ShowFirstCover>True</ShowFirstCover>
</CoverGenerator>
<CoverGenerator Type="Date">
<Text>
<!--<Text>: Text to be shown, %TEXT% will be replaced by the category or song name-->
<Text>%TEXT%</Text>
<Font>
<Name>Normal</Name>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Size> Maximum size of the text in px-->
<Size>120</Size>
</Font>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>
<R>0.988</R>
<G>0.682</G>
<B>0.733</B>
<A>0.8</A>
</Color>
<!--<Margin>: Spacing of the text from the borders of the image in px-->
<Margin Default="5">
<Top>-150</Top>
</Margin>
<!--<Indent>: Indentation of the text for multiple lines-->
<Indent>100</Indent>
</Text>
<BackgroundColor>
<R>1</R>
<G>1</G>
<B>1</B>
<A>1</A>
</BackgroundColor>
<!--<Image>: Background image for the cover-->
<Image>Cover.png</Image>
<!--<ImageAlpha>Alpha value of the image in case the first cover is shown(optional)-->
<ImageAlpha>1.0</ImageAlpha>
<!--<ShowFirstCover>Whether the first cover of a category should be shown(optional)-->
<ShowFirstCover>True</ShowFirstCover>
</CoverGenerator>
</root>
+3
View File
@@ -152,6 +152,9 @@
<string name="TR_SCREENSONG_NUMSONGS">(%v songs)</string> <string name="TR_SCREENSONG_NUMSONGS">(%v songs)</string>
<string name="TR_SCREENSONG_NUMSONG">(%v song)</string> <string name="TR_SCREENSONG_NUMSONG">(%v song)</string>
<string name="TR_SCREENSONG_ARTIST_TITLE">%a - %t</string> <string name="TR_SCREENSONG_ARTIST_TITLE">%a - %t</string>
<string name="TR_SCREENSONG_HELPMESSAGE">A-Z = Jump to the letter • F3 = Search • CTRL+R = Random selection • CTRL+S = Start medley • CTRL+A = Start all random • CTRL+V = Start visible random • Space = Open song options • ESC = Back to main menu</string>
<string name="TR_SCREENSONG_HELPMESSAGESEARCH">A-Z = Search artist and title, prefixes for the search → a: = artist • t: = title • c: = creator • e: = edition • g: = genre • y: = year (e.g. 1999 or 1980-1989) • l: = language • al: = album • fi: = file name • fo: = folder name</string>
<string name="TR_SCREENSONG_HELPMESSAGEPARTY">1-6 = Press your team number to use a random song joker</string>
<string name="TR_SCREENSING_PAUSE">Pause</string> <string name="TR_SCREENSING_PAUSE">Pause</string>
<string name="TR_SCREENSING_BUTTON_CANCEL">Stop singing</string> <string name="TR_SCREENSING_BUTTON_CANCEL">Stop singing</string>
<string name="TR_SCREENSING_BUTTON_CONTINUE">Continue</string> <string name="TR_SCREENSING_BUTTON_CONTINUE">Continue</string>
+3
View File
@@ -147,6 +147,9 @@
<string name="TR_SCREENSONG_NUMSONGS">(%v Lieder)</string> <string name="TR_SCREENSONG_NUMSONGS">(%v Lieder)</string>
<string name="TR_SCREENSONG_NUMSONG">(%v Lied)</string> <string name="TR_SCREENSONG_NUMSONG">(%v Lied)</string>
<string name="TR_SCREENSONG_ARTIST_TITLE">%a -%t</string> <string name="TR_SCREENSONG_ARTIST_TITLE">%a -%t</string>
<string name="TR_SCREENSONG_HELPMESSAGE">A-Z = Zum Buchstaben springen • F3 = Suchen • STRG+R = Zufällige Auswahl • STRG+S = Starte Medley • STRG+A = Alle zufällig starten • STRG+V = Sichtbare zufällig starten • Leertaste = Lied-Optionen öffnen • ESC = Zurück zum Hauptmenü</string>
<string name="TR_SCREENSONG_HELPMESSAGESEARCH">A-Z = Interpreten und Titel durchsuchen, Präfixe für die Suche → a: = Interpret • t: = Titel • c: = Ersteller • e: = Edition • g: = Genre • y: = Jahr (z.B. 1999 oder 1980-1989) • l: = Sprache • al: = Album • fi: = Dateiname • fo: = Ordnername</string>
<string name="TR_SCREENSONG_HELPMESSAGEPARTY">1-6 = Drücke die Teamnummer um einen Zufallssong Joker zu verwenden</string>
<string name="TR_SCREENSING_PAUSE">Pause</string> <string name="TR_SCREENSING_PAUSE">Pause</string>
<string name="TR_SCREENSING_BUTTON_CANCEL">Lied beenden</string> <string name="TR_SCREENSING_BUTTON_CANCEL">Lied beenden</string>
<string name="TR_SCREENSING_BUTTON_CONTINUE">Fortfahren</string> <string name="TR_SCREENSING_BUTTON_CONTINUE">Fortfahren</string>
@@ -1,5 +1,14 @@
ScreenSong ScreenSong
++++++++++
Version 7:
Add:
<TextHelpBar>
<TextHelpBarSearch>
<TextHelpBarParty>
Shows key shortcut and search usage as small text line at the bottom of the screen.
++++++++++ ++++++++++
Version 6: Version 6:
@@ -43,4 +52,4 @@ to SongMenu
Add: Add:
<StaticMedleyCalcIcon> and <StaticMedleyTagIcon> <StaticMedleyCalcIcon> and <StaticMedleyTagIcon>
to SongMenu.SongMenuTileBoard to SongMenu.SongMenuTileBoard
++++++++++ ++++++++++
+4 -4
View File
@@ -46,7 +46,7 @@
<Color Name="BackgroundColorAlpha" /> <Color Name="BackgroundColorAlpha" />
<Rect> <Rect>
<X>0</X> <X>0</X>
<Y>0</Y> <Y>610</Y>
<W>1280</W> <W>1280</W>
<H>90</H> <H>90</H>
<Z>-0.75</Z> <Z>-0.75</Z>
@@ -136,7 +136,7 @@
<Color Name="LyricHelperDuet" /> <Color Name="LyricHelperDuet" />
<Rect> <Rect>
<X>40</X> <X>40</X>
<Y>10</Y> <Y>623</Y>
<W>45</W> <W>45</W>
<H>36</H> <H>36</H>
<Z>-1</Z> <Z>-1</Z>
@@ -1501,7 +1501,7 @@
<Lyric Name="LyricMainDuet"> <Lyric Name="LyricMainDuet">
<Rect> <Rect>
<X>637</X> <X>637</X>
<Y>7</Y> <Y>620</Y>
<W>1200</W> <W>1200</W>
<H>42</H> <H>42</H>
<Z>-1</Z> <Z>-1</Z>
@@ -1512,7 +1512,7 @@
<Lyric Name="LyricSubDuet"> <Lyric Name="LyricSubDuet">
<Rect> <Rect>
<X>637</X> <X>637</X>
<Y>48</Y> <Y>662</Y>
<W>1200</W> <W>1200</W>
<H>35</H> <H>35</H>
<Z>-1</Z> <Z>-1</Z>
+43 -1
View File
@@ -2,7 +2,7 @@
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Informations> <Informations>
<ScreenName>ScreenSong</ScreenName> <ScreenName>ScreenSong</ScreenName>
<ScreenVersion>6</ScreenVersion> <ScreenVersion>7</ScreenVersion>
</Informations> </Informations>
<Backgrounds> <Backgrounds>
<Background Name="Background1"> <Background Name="Background1">
@@ -238,6 +238,48 @@
<Font>Outline</Font> <Font>Outline</Font>
<Text>TR_SCREENSONG_SONGOPTIONS</Text> <Text>TR_SCREENSONG_SONGOPTIONS</Text>
</Text> </Text>
<Text Name="TextHelpBar">
<X>40</X>
<Y>700</Y>
<Z>0</Z>
<H>16</H>
<MaxW>1200</MaxW>
<Color Name="TextColor" />
<SelColor Name="TextSelColor" />
<Align>Left</Align>
<ResizeAlign>Bottom</ResizeAlign>
<Style>Normal</Style>
<Font>Outline</Font>
<Text>TR_SCREENSONG_HELPMESSAGE</Text>
</Text>
<Text Name="TextHelpBarSearch">
<X>40</X>
<Y>700</Y>
<Z>0</Z>
<H>16</H>
<MaxW>1200</MaxW>
<Color Name="TextColor" />
<SelColor Name="TextSelColor" />
<Align>Left</Align>
<ResizeAlign>Bottom</ResizeAlign>
<Style>Normal</Style>
<Font>Outline</Font>
<Text>TR_SCREENSONG_HELPMESSAGESEARCH</Text>
</Text>
<Text Name="TextHelpBarParty">
<X>40</X>
<Y>700</Y>
<Z>0</Z>
<H>16</H>
<MaxW>1200</MaxW>
<Color Name="TextColor" />
<SelColor Name="TextSelColor" />
<Align>Left</Align>
<ResizeAlign>Bottom</ResizeAlign>
<Style>Normal</Style>
<Font>Outline</Font>
<Text>TR_SCREENSONG_HELPMESSAGEPARTY</Text>
</Text>
</Texts> </Texts>
<Buttons> <Buttons>
<Button Name="ButtonJoker1"> <Button Name="ButtonJoker1">
@@ -427,6 +427,7 @@ namespace VocaluxeLib.PartyModes.Challenge
_ScreenSongOptions.Sorting.Tabs = CBase.Config.GetTabs(); _ScreenSongOptions.Sorting.Tabs = CBase.Config.GetTabs();
_ScreenSongOptions.Sorting.FilterPlaylistID = -1; _ScreenSongOptions.Sorting.FilterPlaylistID = -1;
_ScreenSongOptions.Selection.SongIndex = -1;
_ScreenSongOptions.Selection.CategoryIndex = -1; _ScreenSongOptions.Selection.CategoryIndex = -1;
_ScreenSongOptions.Selection.CategoryChangeAllowed = true; _ScreenSongOptions.Selection.CategoryChangeAllowed = true;
break; break;
@@ -718,4 +719,4 @@ namespace VocaluxeLib.PartyModes.Challenge
return result; return result;
} }
} }
} }
+10 -10
View File
@@ -76,7 +76,7 @@ namespace Tests.VocaluxeLib.Log
StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong"); StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong");
StringAssert.Contains("[Verbose] " + _TestMessageWithResolvedData, log, "Main log entry wrong"); StringAssert.Contains("[Verbose] " + _TestMessageWithResolvedData, log, "Main log entry wrong");
StringAssert.Contains(_TestMessageWithData, error, "Error message wrong"); StringAssert.Contains(_TestMessageWithResolvedData, error, "Error message wrong");
}, },
ELogLevel.Verbose); ELogLevel.Verbose);
@@ -129,7 +129,7 @@ namespace Tests.VocaluxeLib.Log
StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong"); StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong");
StringAssert.Contains("[Verbose] " + _TestMessageWithResolvedData, log, "Main log entry wrong"); StringAssert.Contains("[Verbose] " + _TestMessageWithResolvedData, log, "Main log entry wrong");
StringAssert.Contains(_TestMessageWithData, error, "Error message wrong"); StringAssert.Contains(_TestMessageWithResolvedData, error, "Error message wrong");
}, },
ELogLevel.Verbose); ELogLevel.Verbose);
@@ -287,7 +287,7 @@ namespace Tests.VocaluxeLib.Log
StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong"); StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong");
StringAssert.Contains("[Debug] " + _TestMessageWithResolvedData, log, "Main log entry wrong"); StringAssert.Contains("[Debug] " + _TestMessageWithResolvedData, log, "Main log entry wrong");
StringAssert.Contains(_TestMessageWithData, error, "Error message wrong"); StringAssert.Contains(_TestMessageWithResolvedData, error, "Error message wrong");
}, },
ELogLevel.Verbose); ELogLevel.Verbose);
@@ -340,7 +340,7 @@ namespace Tests.VocaluxeLib.Log
StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong"); StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong");
StringAssert.Contains("[Debug] " + _TestMessageWithResolvedData, log, "Main log entry wrong"); StringAssert.Contains("[Debug] " + _TestMessageWithResolvedData, log, "Main log entry wrong");
StringAssert.Contains(_TestMessageWithData, error, "Error message wrong"); StringAssert.Contains(_TestMessageWithResolvedData, error, "Error message wrong");
}, },
ELogLevel.Verbose); ELogLevel.Verbose);
@@ -498,7 +498,7 @@ namespace Tests.VocaluxeLib.Log
StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong"); StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong");
StringAssert.Contains("[Information] " + _TestMessageWithResolvedData, log, "Main log entry wrong"); StringAssert.Contains("[Information] " + _TestMessageWithResolvedData, log, "Main log entry wrong");
StringAssert.Contains(_TestMessageWithData, error, "Error message wrong"); StringAssert.Contains(_TestMessageWithResolvedData, error, "Error message wrong");
}, },
ELogLevel.Verbose); ELogLevel.Verbose);
@@ -551,7 +551,7 @@ namespace Tests.VocaluxeLib.Log
StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong"); StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong");
StringAssert.Contains("[Information] " + _TestMessageWithResolvedData, log, "Main log entry wrong"); StringAssert.Contains("[Information] " + _TestMessageWithResolvedData, log, "Main log entry wrong");
StringAssert.Contains(_TestMessageWithData, error, "Error message wrong"); StringAssert.Contains(_TestMessageWithResolvedData, error, "Error message wrong");
}, },
ELogLevel.Verbose); ELogLevel.Verbose);
@@ -709,7 +709,7 @@ namespace Tests.VocaluxeLib.Log
StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong"); StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong");
StringAssert.Contains("[Warning] " + _TestMessageWithResolvedData, log, "Main log entry wrong"); StringAssert.Contains("[Warning] " + _TestMessageWithResolvedData, log, "Main log entry wrong");
StringAssert.Contains(_TestMessageWithData, error, "Error message wrong"); StringAssert.Contains(_TestMessageWithResolvedData, error, "Error message wrong");
}, },
ELogLevel.Verbose); ELogLevel.Verbose);
@@ -762,7 +762,7 @@ namespace Tests.VocaluxeLib.Log
StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong"); StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong");
StringAssert.Contains("[Warning] " + _TestMessageWithResolvedData, log, "Main log entry wrong"); StringAssert.Contains("[Warning] " + _TestMessageWithResolvedData, log, "Main log entry wrong");
StringAssert.Contains(_TestMessageWithData, error, "Error message wrong"); StringAssert.Contains(_TestMessageWithResolvedData, error, "Error message wrong");
}, },
ELogLevel.Verbose); ELogLevel.Verbose);
@@ -920,7 +920,7 @@ namespace Tests.VocaluxeLib.Log
StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong"); StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong");
StringAssert.Contains("[Error] " + _TestMessageWithResolvedData, log, "Main log entry wrong"); StringAssert.Contains("[Error] " + _TestMessageWithResolvedData, log, "Main log entry wrong");
StringAssert.Contains(_TestMessageWithData, error, "Error message wrong"); StringAssert.Contains(_TestMessageWithResolvedData, error, "Error message wrong");
}, },
ELogLevel.Verbose); ELogLevel.Verbose);
@@ -973,7 +973,7 @@ namespace Tests.VocaluxeLib.Log
StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong"); StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong");
StringAssert.Contains("[Error] " + _TestMessageWithResolvedData, log, "Main log entry wrong"); StringAssert.Contains("[Error] " + _TestMessageWithResolvedData, log, "Main log entry wrong");
StringAssert.Contains(_TestMessageWithData, error, "Error message wrong"); StringAssert.Contains(_TestMessageWithResolvedData, error, "Error message wrong");
}, },
ELogLevel.Verbose); ELogLevel.Verbose);
+1 -1
View File
@@ -101,7 +101,7 @@ namespace Tests.VocaluxeLib.Log
StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong"); StringAssert.Contains("Version = " + versionTag, log, "Main log version tag entry wrong");
StringAssert.Contains("[<#= LogLevel #>] " + <#= WithData?"_TestMessageWithResolvedData":"_TestMessage" #>, log, "Main log entry wrong"); StringAssert.Contains("[<#= LogLevel #>] " + <#= WithData?"_TestMessageWithResolvedData":"_TestMessage" #>, log, "Main log entry wrong");
StringAssert.Contains(<#= WithData?"_TestMessageWithData":"_TestMessage" #>, error, "Error message wrong"); StringAssert.Contains(<#= WithData?"_TestMessageWithResolvedData":"_TestMessage" #>, error, "Error message wrong");
}, },
ELogLevel.Verbose); ELogLevel.Verbose);
+6 -1
View File
@@ -133,6 +133,11 @@ namespace Vocaluxe.Base
{ {
_UnloadCovers(); _UnloadCovers();
_LoadCovers(); _LoadCovers();
// Stefan1200: Added a workaround to fix issue #446, because switching the cover theme gets bugged on the song screen and needed a game restart.
// Toggle the tabs view fixes this bug somehow.
CSongs.Categorizer.Tabs = (CConfig.Config.Game.Tabs == EOffOn.TR_CONFIG_ON ? EOffOn.TR_CONFIG_OFF : EOffOn.TR_CONFIG_ON);
CSongs.Categorizer.Tabs = CConfig.Config.Game.Tabs;
} }
private static void _UnloadCovers() private static void _UnloadCovers()
@@ -288,4 +293,4 @@ namespace Vocaluxe.Base
} }
} }
} }
} }
+162 -3
View File
@@ -1,4 +1,4 @@
#region license #region license
// This file is part of Vocaluxe. // This file is part of Vocaluxe.
// //
// Vocaluxe is free software: you can redistribute it and/or modify // Vocaluxe is free software: you can redistribute it and/or modify
@@ -93,6 +93,89 @@ namespace Vocaluxe.Base
if (_SearchString != "") if (_SearchString != "")
searchStrings = _SearchString.ToUpper().Split(new char[] {' '}); searchStrings = _SearchString.ToUpper().Split(new char[] {' '});
String searchForArtist = null; // a:
String searchForTitle = null; // t:
String searchForGenre = null; // g:
String searchForYear = null; // y:
String searchForLanguage = null; // l:
String searchForCreator = null; // c:
String searchForEdition = null; // e:
String searchForAlbum = null; // al:
String searchForFileName = null; // fi:
String searchForFolderName = null; // fo:
bool expertSearch = false;
if (searchStrings != null)
{
foreach (String searchToken in searchStrings)
{
if (searchToken.Length < 3)
continue;
String temp = searchToken.Substring(0, 2);
bool foundIt = true;
switch (temp)
{
case "A:":
searchForArtist = searchToken.Substring(2);
break;
case "T:":
searchForTitle = searchToken.Substring(2);
break;
case "G:":
searchForGenre = searchToken.Substring(2);
break;
case "Y:":
searchForYear = searchToken.Substring(2);
break;
case "L:":
searchForLanguage = searchToken.Substring(2);
break;
case "C:":
searchForCreator = searchToken.Substring(2);
break;
case "E:":
searchForEdition = searchToken.Substring(2);
break;
default:
foundIt = false;
break;
}
if (foundIt)
{
if (!expertSearch) expertSearch = true;
continue;
}
if (searchToken.Length < 4)
continue;
foundIt = true;
temp = searchToken.Substring(0, 3);
switch (temp)
{
case "AL:":
searchForAlbum = searchToken.Substring(3);
break;
case "FI:":
searchForFileName = searchToken.Substring(3);
break;
case "FO:":
searchForFolderName = searchToken.Substring(3);
break;
default:
foundIt = false;
break;
}
if (foundIt && !expertSearch)
expertSearch = true;
}
}
foreach (CSong song in CSongs.Songs) foreach (CSong song in CSongs.Songs)
{ {
if (_PlaylistID != -1 && !CBase.Playlist.ContainsSong(_PlaylistID, song.ID)) if (_PlaylistID != -1 && !CBase.Playlist.ContainsSong(_PlaylistID, song.ID))
@@ -102,9 +185,85 @@ namespace Vocaluxe.Base
{ {
if (searchStrings == null) if (searchStrings == null)
_FilteredSongs.Add(song); _FilteredSongs.Add(song);
else if (expertSearch)
{
// Stefan1200: Stop at a maximum of 500 search result to prevent performance issues
if (_FilteredSongs.Count >= 500)
break;
if (searchForAlbum != null && song.Album.ToUpper().Contains(searchForAlbum))
_FilteredSongs.Add(song);
if (searchForArtist != null && song.Artist.ToUpper().Contains(searchForArtist))
_FilteredSongs.Add(song);
if (searchForTitle != null && song.Title.ToUpper().Contains(searchForTitle))
_FilteredSongs.Add(song);
if (searchForCreator != null && song.Creator.ToUpper().Contains(searchForCreator))
_FilteredSongs.Add(song);
if (searchForFileName != null && song.FileName.ToUpper().Contains(searchForFileName))
_FilteredSongs.Add(song);
if (searchForFolderName != null && song.FolderName.ToUpper().Contains(searchForFolderName))
_FilteredSongs.Add(song);
if (searchForGenre != null)
{
foreach (String genre in song.Genres)
{
if (genre.ToUpper().Contains(searchForGenre))
_FilteredSongs.Add(song);
}
}
if (searchForLanguage != null)
{
foreach (String language in song.Languages)
{
if (language.ToUpper().Contains(searchForLanguage))
_FilteredSongs.Add(song);
}
}
if (searchForEdition != null)
{
foreach (String edition in song.Editions)
{
if (edition.ToUpper().Contains(searchForEdition))
_FilteredSongs.Add(song);
}
}
if (searchForYear != null)
{
int pos = searchForYear.IndexOf("-");
if (pos == -1)
{
if (song.Year.Contains(searchForYear))
_FilteredSongs.Add(song);
}
else if (searchForYear.Length == 9)
{
int yearStart = -1;
int yearEnd = -1;
if (!Int32.TryParse(searchForYear.Substring(0, pos), out yearStart))
continue;
if (!Int32.TryParse(searchForYear.Substring(pos + 1), out yearEnd))
continue;
// Stefan1200: Prevent searches like 0000-9999, limit for a max distance of 100 years
if (yearEnd - yearStart > 100)
continue;
int yearSearch = -1;
if (!Int32.TryParse(song.Year, out yearSearch))
continue;
if (yearSearch >= yearStart && yearSearch <= yearEnd)
_FilteredSongs.Add(song);
}
}
}
else else
{ {
string search = song.Title.ToUpper() + " " + song.Artist.ToUpper() + " " + song.FolderName.ToUpper() + " " + song.FileName.ToUpper(); string search = song.Title.ToUpper() + " " + song.Artist.ToUpper();
if (searchStrings.All(search.Contains)) if (searchStrings.All(search.Contains))
_FilteredSongs.Add(song); _FilteredSongs.Add(song);
@@ -114,4 +273,4 @@ namespace Vocaluxe.Base
_Changed = false; _Changed = false;
} }
} }
} }
+42 -30
View File
@@ -1,4 +1,4 @@
#region license #region license
// This file is part of Vocaluxe. // This file is part of Vocaluxe.
// //
// Vocaluxe is free software: you can redistribute it and/or modify // Vocaluxe is free software: you can redistribute it and/or modify
@@ -112,7 +112,7 @@ namespace Vocaluxe.Screens
private float _Length = -1f; private float _Length = -1f;
private CVideoStream _CurrentVideo; private CVideoStream _CurrentVideo;
private EAspect _VideoAspect = EAspect.Crop; private EAspect _VideoAspect = EAspect.Automatic;
private CTextureRef _CurrentWebcamFrameTexture; private CTextureRef _CurrentWebcamFrameTexture;
private CTextureRef _Background; private CTextureRef _Background;
@@ -123,6 +123,7 @@ namespace Vocaluxe.Screens
private float _RemainingTimeToFirstNote; private float _RemainingTimeToFirstNote;
private float _TimeToFirstNoteDuet; private float _TimeToFirstNoteDuet;
private float _RemainingTimeToFirstNoteDuet; private float _RemainingTimeToFirstNoteDuet;
private float _TimeShowSongTextTotal;
private Stopwatch _TimerSongText; private Stopwatch _TimerSongText;
private Stopwatch _TimerDuetText1; private Stopwatch _TimerDuetText1;
@@ -482,17 +483,11 @@ namespace Vocaluxe.Screens
if (alpha.Length > 2) if (alpha.Length > 2)
{ {
_Lyrics[_LyricMainDuet].Alpha = alpha[0]; _Lyrics[_LyricMainDuet].Alpha = alpha[2];
_Lyrics[_LyricSubDuet].Alpha = alpha[1]; _Lyrics[_LyricSubDuet].Alpha = alpha[3];
_Statics[_StaticLyricsDuet].Alpha = alpha[0]; _Statics[_StaticLyricsDuet].Alpha = alpha[2];
_Statics[_StaticLyricHelperDuet].Alpha = alpha[0]; _Statics[_StaticLyricHelperDuet].Alpha = alpha[2];
_Lyrics[_LyricMain].Alpha = alpha[2];
_Lyrics[_LyricSub].Alpha = alpha[3];
_Statics[_StaticLyrics].Alpha = alpha[2];
_Statics[_StaticLyricHelper].Alpha = alpha[2];
} }
} }
@@ -551,7 +546,7 @@ namespace Vocaluxe.Screens
_SingNotes[_SingBars].PlayerNotes[j].SetLine(nr); _SingNotes[_SingBars].PlayerNotes[j].SetLine(nr);
} }
if (i == 0 && !song.IsDuet || i == 1 && song.IsDuet) if (i == 0)
{ {
_Lyrics[_LyricMain].SetLine(lines[nr]); _Lyrics[_LyricMain].SetLine(lines[nr]);
_Lyrics[_LyricMainTop].SetLine(lines[nr]); _Lyrics[_LyricMainTop].SetLine(lines[nr]);
@@ -569,7 +564,7 @@ namespace Vocaluxe.Screens
_Lyrics[_LyricSubTop].Clear(); _Lyrics[_LyricSubTop].Clear();
} }
} }
if (i == 0 && song.IsDuet) if (i == 1 && song.IsDuet)
{ {
_Lyrics[_LyricMainDuet].SetLine(lines[nr]); _Lyrics[_LyricMainDuet].SetLine(lines[nr]);
_TimeToFirstNoteDuet = CGame.GetTimeFromBeats(lines[nr].FirstNoteBeat - lines[nr].StartBeat, song.BPM); _TimeToFirstNoteDuet = CGame.GetTimeFromBeats(lines[nr].FirstNoteBeat - lines[nr].StartBeat, song.BPM);
@@ -583,7 +578,7 @@ namespace Vocaluxe.Screens
} }
else else
{ {
if (i == 0 && !song.IsDuet || i == 1 && song.IsDuet) if (i == 0)
{ {
_Lyrics[_LyricMain].Clear(); _Lyrics[_LyricMain].Clear();
_Lyrics[_LyricSub].Clear(); _Lyrics[_LyricSub].Clear();
@@ -592,7 +587,7 @@ namespace Vocaluxe.Screens
_TimeToFirstNote = 0f; _TimeToFirstNote = 0f;
} }
if (i == 0 && song.IsDuet) if (i == 1 && song.IsDuet)
{ {
_Lyrics[_LyricMainDuet].Clear(); _Lyrics[_LyricMainDuet].Clear();
_Lyrics[_LyricSubDuet].Clear(); _Lyrics[_LyricSubDuet].Clear();
@@ -629,23 +624,23 @@ namespace Vocaluxe.Screens
private void _UpdateSongText() private void _UpdateSongText()
{ {
if (_TimerSongText.IsRunning && !_Lyrics[_LyricMainDuet].Visible && !_Lyrics[_LyricMainTop].Visible) if (_TimerSongText.IsRunning)
{ {
float t = _TimerSongText.ElapsedMilliseconds / 1000f; float t = _TimerSongText.ElapsedMilliseconds / 1000f;
if (t < 10f) if (t < _TimeShowSongTextTotal)
{ {
_Statics[_StaticSongText].Visible = true; _Statics[_StaticSongText].Visible = true;
_Texts[_TextSongName].Visible = true; _Texts[_TextSongName].Visible = true;
if (t < 7f) if (t < (_TimeShowSongTextTotal - 3f))
{ {
_Statics[_StaticSongText].Color.A = 1f; _Statics[_StaticSongText].Color.A = 1f;
_Texts[_TextSongName].Color.A = 1f; _Texts[_TextSongName].Color.A = 1f;
} }
else else
{ {
_Statics[_StaticSongText].Color.A = (10f - t) / 3f; _Statics[_StaticSongText].Color.A = (_TimeShowSongTextTotal - t) / 3f;
_Texts[_TextSongName].Color.A = (10f - t) / 3f; _Texts[_TextSongName].Color.A = (_TimeShowSongTextTotal - t) / 3f;
} }
} }
else else
@@ -684,7 +679,7 @@ namespace Vocaluxe.Screens
timer.Stop(); timer.Stop();
} }
} }
else if (!timer.IsRunning && timer.ElapsedMilliseconds == 0 && _Lyrics[_LyricMainDuet].Alpha > 0 && CGame.GetSong().IsDuet) else if (!timer.IsRunning && timer.ElapsedMilliseconds == 0 && _Lyrics[_LyricMainTop].Alpha > 0 && CGame.GetSong().IsDuet)
timer.Start(); timer.Start();
else else
textName.Visible = false; textName.Visible = false;
@@ -717,7 +712,7 @@ namespace Vocaluxe.Screens
_TimerDuetText2.Stop(); _TimerDuetText2.Stop();
} }
} }
else if (!_TimerDuetText2.IsRunning && _TimerDuetText2.ElapsedMilliseconds == 0 && _Lyrics[_LyricMain].Alpha > 0 && CGame.GetSong().IsDuet) else if (!_TimerDuetText2.IsRunning && _TimerDuetText2.ElapsedMilliseconds == 0 && _Lyrics[_LyricMainDuet].Alpha > 0 && CGame.GetSong().IsDuet)
_TimerDuetText2.Start(); _TimerDuetText2.Start();
else else
_Texts[_TextDuetName2].Visible = false; _Texts[_TextDuetName2].Visible = false;
@@ -813,18 +808,21 @@ namespace Vocaluxe.Screens
if (_CurrentVideo != null && CConfig.Config.Video.VideosInSongs == EOffOn.TR_CONFIG_ON && !_Webcam) if (_CurrentVideo != null && CConfig.Config.Video.VideosInSongs == EOffOn.TR_CONFIG_ON && !_Webcam)
{ {
background = _CurrentVideo.Texture; background = _CurrentVideo.Texture;
aspect = _VideoAspect;
} }
else if (_Webcam) else if (_Webcam)
{ {
background = _CurrentWebcamFrameTexture; background = _CurrentWebcamFrameTexture;
aspect = _VideoAspect;
} }
else else
background = _Background; background = _Background;
if (background != null) if (background != null)
{ {
SRectF bounds = CSettings.RenderRect; SRectF bounds = CSettings.RenderRect;
if (_VideoAspect == EAspect.Automatic)
_VideoAspect = (background.OrigAspect <= 1.5 ? EAspect.LetterBox : EAspect.Crop);
aspect = _VideoAspect;
SRectF rect = CHelper.FitInBounds(bounds, background.OrigAspect, aspect); SRectF rect = CHelper.FitInBounds(bounds, background.OrigAspect, aspect);
CDraw.DrawTexture(background, rect, background.Color, bounds); CDraw.DrawTexture(background, rect, background.Color, bounds);
} }
@@ -895,7 +893,7 @@ namespace Vocaluxe.Screens
_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[_StaticLyricHelperTop].Alpha * alpha);
float 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,
@@ -1107,7 +1105,7 @@ namespace Vocaluxe.Screens
{ {
_CurrentVideo = CVideo.Load(Path.Combine(song.Folder, song.VideoFileName)); _CurrentVideo = CVideo.Load(Path.Combine(song.Folder, song.VideoFileName));
CVideo.Skip(_CurrentVideo, song.Start, song.VideoGap); CVideo.Skip(_CurrentVideo, song.Start, song.VideoGap);
_VideoAspect = song.VideoAspect; _VideoAspect = EAspect.Automatic;
} }
CDraw.RemoveTexture(ref _Background); CDraw.RemoveTexture(ref _Background);
@@ -1165,7 +1163,21 @@ namespace Vocaluxe.Screens
_TimerDuetText1.Reset(); _TimerDuetText1.Reset();
_TimerDuetText2.Reset(); _TimerDuetText2.Reset();
if (!song.IsDuet) float realGap = song.Gap - song.Start;
_TimeShowSongTextTotal = 10f;
if (_Lyrics[_LyricMainDuet].Visible || _Lyrics[_LyricMainTop].Visible)
{
if (realGap < 11f)
{
_TimeShowSongTextTotal = 0;
}
else if (realGap < 17f)
{
_TimeShowSongTextTotal = realGap - 7f;
}
}
if (_TimeShowSongTextTotal > 0)
_TimerSongText.Start(); _TimerSongText.Start();
} }
@@ -1216,8 +1228,8 @@ namespace Vocaluxe.Screens
if (CGame.GetSong() != null && CGame.GetSong().IsDuet) if (CGame.GetSong() != null && CGame.GetSong().IsDuet)
{ {
bottomLyricsVisible = true; bottomLyricsVisible = false;
topLyricsVisible = false; topLyricsVisible = true;
duetLyricsVisible = true; duetLyricsVisible = true;
} }
+52 -43
View File
@@ -1,4 +1,4 @@
#region license #region license
// This file is part of Vocaluxe. // This file is part of Vocaluxe.
// //
// Vocaluxe is free software: you can redistribute it and/or modify // Vocaluxe is free software: you can redistribute it and/or modify
@@ -42,13 +42,16 @@ 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 const string _TextCategory = "TextCategory"; private const string _TextCategory = "TextCategory";
private const string _TextSelection = "TextSelection"; private const string _TextSelection = "TextSelection";
private const string _TextSearchBarTitle = "TextSearchBarTitle"; private const string _TextSearchBarTitle = "TextSearchBarTitle";
private const string _TextSearchBar = "TextSearchBar"; private const string _TextSearchBar = "TextSearchBar";
private const string _TextHelpBar = "TextHelpBar";
private const string _TextHelpBarSearch = "TextHelpBarSearch";
private const string _TextHelpBarParty = "TextHelpBarParty";
private const string _TextOptionsTitle = "TextOptionsTitle"; private const string _TextOptionsTitle = "TextOptionsTitle";
private const string _ButtonOpenOptions = "ButtonOpenOptions"; private const string _ButtonOpenOptions = "ButtonOpenOptions";
@@ -77,6 +80,9 @@ namespace Vocaluxe.Screens
private string _SearchText = String.Empty; private string _SearchText = String.Empty;
private bool _SearchActive; private bool _SearchActive;
private int _JumpTo_lastCharTime = 0;
private String _JumpTo_lastSearchString = "";
private readonly List<string> _ButtonsJoker = new List<string>(); private readonly List<string> _ButtonsJoker = new List<string>();
private readonly List<string> _TextsPlayer = new List<string>(); private readonly List<string> _TextsPlayer = new List<string>();
private ESongOptionsView _CurSongOptionsView; private ESongOptionsView _CurSongOptionsView;
@@ -134,6 +140,9 @@ namespace Vocaluxe.Screens
tlist.Add(_TextSelection); tlist.Add(_TextSelection);
tlist.Add(_TextSearchBarTitle); tlist.Add(_TextSearchBarTitle);
tlist.Add(_TextSearchBar); tlist.Add(_TextSearchBar);
tlist.Add(_TextHelpBar);
tlist.Add(_TextHelpBarSearch);
tlist.Add(_TextHelpBarParty);
tlist.Add(_TextOptionsTitle); tlist.Add(_TextOptionsTitle);
_ThemeStatics = new string[] {_StaticSearchBar, _StaticOptionsBG}; _ThemeStatics = new string[] {_StaticSearchBar, _StaticOptionsBG};
@@ -279,6 +288,21 @@ namespace Vocaluxe.Screens
else if (!_Sso.Selection.PartyMode) else if (!_Sso.Selection.PartyMode)
_SearchActive = true; _SearchActive = true;
break; break;
case Keys.V:
if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.PartyMode)
_StartRandomVisibleSongs();
break;
case Keys.R:
if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.RandomOnly)
_SelectNextRandom(-1);
break;
case Keys.S:
if (keyEvent.Mod == EModifier.Ctrl && CSongs.NumSongsVisible > 0 && !_Sso.Selection.PartyMode)
_StartMedleySong(_SongMenu.GetPreviewSongNr());
break;
} }
if (!_SearchActive) if (!_SearchActive)
{ {
@@ -293,23 +317,9 @@ namespace Vocaluxe.Screens
if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.PartyMode) if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.PartyMode)
_StartRandomAllSongs(); _StartRandomAllSongs();
break; break;
case Keys.V:
if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.PartyMode)
_StartRandomVisibleSongs();
break;
case Keys.R:
if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.RandomOnly)
_SelectNextRandom(-1);
break;
case Keys.S:
if (keyEvent.Mod == EModifier.Ctrl && CSongs.NumSongsVisible > 0 && !_Sso.Selection.PartyMode)
_StartMedleySong(_SongMenu.GetPreviewSongNr());
break;
case Keys.F: case Keys.F:
if (keyEvent.Mod == EModifier.Ctrl) if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.PartyMode)
_SearchActive = true; _SearchActive = true;
break; break;
@@ -727,12 +737,18 @@ namespace Vocaluxe.Screens
_Texts[_TextSearchBar].Visible = true; _Texts[_TextSearchBar].Visible = true;
_Texts[_TextSearchBarTitle].Visible = true; _Texts[_TextSearchBarTitle].Visible = true;
_Texts[_TextHelpBar].Visible = false;
_Texts[_TextHelpBarSearch].Visible = true;
_Texts[_TextHelpBarParty].Visible = false;
_Statics[_StaticSearchBar].Visible = true; _Statics[_StaticSearchBar].Visible = true;
} }
else else
{ {
_Texts[_TextSearchBar].Visible = false; _Texts[_TextSearchBar].Visible = false;
_Texts[_TextSearchBarTitle].Visible = false; _Texts[_TextSearchBarTitle].Visible = false;
_Texts[_TextHelpBar].Visible = !_Sso.Selection.PartyMode;
_Texts[_TextHelpBarSearch].Visible = false;
_Texts[_TextHelpBarParty].Visible = _Sso.Selection.PartyMode;
_Statics[_StaticSearchBar].Visible = false; _Statics[_StaticSearchBar].Visible = false;
} }
@@ -1042,8 +1058,14 @@ namespace Vocaluxe.Screens
private void _JumpTo(char letter) private void _JumpTo(char letter)
{ {
// Stefan1200: Add all letters from a key press within one second to a search string. Clear search string, if last key press is older than one second.
String searchString;
if (Environment.TickCount - _JumpTo_lastCharTime < 1000)
searchString = _JumpTo_lastSearchString + letter.ToString();
else
searchString = letter.ToString();
int start = 0; int start = 0;
int curSelected = CSongs.IsInCategory ? _SongMenu.GetSelectedSongNr() : _SongMenu.GetSelectedCategory();
bool firstLevel = CConfig.Config.Game.Tabs == EOffOn.TR_CONFIG_OFF && CSongs.IsInCategory; bool firstLevel = CConfig.Config.Game.Tabs == EOffOn.TR_CONFIG_OFF && CSongs.IsInCategory;
bool secondSort = CConfig.Config.Game.Tabs == EOffOn.TR_CONFIG_ON && bool secondSort = CConfig.Config.Game.Tabs == EOffOn.TR_CONFIG_ON &&
(CConfig.Config.Game.SongSorting == ESongSorting.TR_CONFIG_ARTIST || (CConfig.Config.Game.SongSorting == ESongSorting.TR_CONFIG_ARTIST ||
@@ -1055,34 +1077,25 @@ namespace Vocaluxe.Screens
//TODO: What's to do with multiple tags? //TODO: What's to do with multiple tags?
//Flamefire: What? We only sorted by one tag, sorting by multiple tags (e.g. Album) will be by e.g. the first entry. That can be used here too as otherwhise it will confuse users because it jumps randomly //Flamefire: What? We only sorted by one tag, sorting by multiple tags (e.g. Album) will be by e.g. the first entry. That can be used here too as otherwhise it will confuse users because it jumps randomly
ReadOnlyCollection<CSong> songs = CSongs.VisibleSongs; ReadOnlyCollection<CSong> songs = CSongs.VisibleSongs;
int ct = songs.Count;
int visibleID = -1; int visibleID = -1;
switch (CConfig.Config.Game.SongSorting) switch (CConfig.Config.Game.SongSorting)
{ {
case ESongSorting.TR_CONFIG_ARTIST: case ESongSorting.TR_CONFIG_ARTIST:
case ESongSorting.TR_CONFIG_ARTIST_LETTER: case ESongSorting.TR_CONFIG_ARTIST_LETTER:
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase));
start = curSelected + 1;
visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
break; break;
case ESongSorting.TR_CONFIG_YEAR: case ESongSorting.TR_CONFIG_YEAR:
case ESongSorting.TR_CONFIG_DECADE: case ESongSorting.TR_CONFIG_DECADE:
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Year.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) visibleID = _FindIndex(songs, start, element => element.Year.StartsWith(searchString, StringComparison.OrdinalIgnoreCase));
start = curSelected + 1;
visibleID = _FindIndex(songs, start, element => element.Year.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
break; break;
case ESongSorting.TR_CONFIG_TITLE_LETTER: case ESongSorting.TR_CONFIG_TITLE_LETTER:
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase));
start = curSelected + 1;
visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
break; break;
case ESongSorting.TR_CONFIG_FOLDER: case ESongSorting.TR_CONFIG_FOLDER:
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) visibleID = _FindIndex(songs, start, element => element.FolderName.StartsWith(searchString, StringComparison.OrdinalIgnoreCase));
start = curSelected + 1;
visibleID = _FindIndex(songs, start, element => element.Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
break; break;
} }
if (visibleID > -1) if (visibleID > -1)
@@ -1091,22 +1104,17 @@ namespace Vocaluxe.Screens
else if (secondSort && CSongs.IsInCategory) else if (secondSort && CSongs.IsInCategory)
{ {
ReadOnlyCollection<CSong> songs = CSongs.VisibleSongs; ReadOnlyCollection<CSong> songs = CSongs.VisibleSongs;
int ct = songs.Count;
int visibleID = -1; int visibleID = -1;
switch (CConfig.Config.Game.SongSorting) switch (CConfig.Config.Game.SongSorting)
{ {
case ESongSorting.TR_CONFIG_FOLDER: case ESongSorting.TR_CONFIG_FOLDER:
case ESongSorting.TR_CONFIG_TITLE_LETTER: case ESongSorting.TR_CONFIG_TITLE_LETTER:
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase));
start = curSelected + 1;
visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
break; break;
case ESongSorting.TR_CONFIG_ARTIST: case ESongSorting.TR_CONFIG_ARTIST:
case ESongSorting.TR_CONFIG_ARTIST_LETTER: case ESongSorting.TR_CONFIG_ARTIST_LETTER:
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase));
start = curSelected + 1;
visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
break; break;
} }
if (visibleID > -1) if (visibleID > -1)
@@ -1115,13 +1123,14 @@ namespace Vocaluxe.Screens
else if (!CSongs.IsInCategory) else if (!CSongs.IsInCategory)
{ {
ReadOnlyCollection<CCategory> categories = CSongs.Categories; ReadOnlyCollection<CCategory> categories = CSongs.Categories;
int ct = categories.Count; int visibleID = _FindIndex(categories, start, element => element.Name.StartsWith(searchString, StringComparison.OrdinalIgnoreCase));
if (curSelected >= 0 && curSelected < ct - 1 && categories[curSelected].Name.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
start = curSelected + 1;
int visibleID = _FindIndex(categories, start, element => element.Name.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
if (visibleID > -1) if (visibleID > -1)
_SongMenu.SetSelectedCategory(visibleID); _SongMenu.SetSelectedCategory(visibleID);
} }
// Stefan1200: Remember search string and current TickCount in class variables.
_JumpTo_lastCharTime = Environment.TickCount;
_JumpTo_lastSearchString = searchString;
} }
private void _ApplyNewSearchFilter(string newFilterString) private void _ApplyNewSearchFilter(string newFilterString)
@@ -1395,4 +1404,4 @@ namespace Vocaluxe.Screens
} }
#endregion Playlist Actions #endregion Playlist Actions
} }
} }
+9 -3
View File
@@ -1,4 +1,4 @@
#region license #region license
// This file is part of Vocaluxe. // This file is part of Vocaluxe.
// //
// Vocaluxe is free software: you can redistribute it and/or modify // Vocaluxe is free software: you can redistribute it and/or modify
@@ -101,6 +101,7 @@ namespace VocaluxeLib
switch (aspect) switch (aspect)
{ {
case EAspect.Automatic:
case EAspect.Crop: case EAspect.Crop:
if (boundsAspectRatio >= aspectRatio) if (boundsAspectRatio >= aspectRatio)
{ {
@@ -138,7 +139,12 @@ namespace VocaluxeLib
} }
break; break;
case EAspect.LetterBox: case EAspect.LetterBox:
if (boundsAspectRatio <= aspectRatio) if (boundsAspectRatio == aspectRatio) // Pillarbox
{
scaledWidth = bounds.W * 0.77f;
scaledHeight = bounds.W / aspectRatio;
}
else if (boundsAspectRatio < aspectRatio)
{ {
scaledWidth = bounds.W; scaledWidth = bounds.W;
scaledHeight = bounds.W / aspectRatio; scaledHeight = bounds.W / aspectRatio;
@@ -306,4 +312,4 @@ namespace VocaluxeLib
return bmp; return bmp;
} }
} }
} }
+2 -1
View File
@@ -64,6 +64,7 @@ namespace VocaluxeLib
#region Fonts #region Fonts
public enum EAspect public enum EAspect
{ {
Automatic,
Crop, Crop,
LetterBox, LetterBox,
Stretch, Stretch,
@@ -436,4 +437,4 @@ namespace VocaluxeLib
TR_USERROLE_PROFILEEDITOR = 32 TR_USERROLE_PROFILEEDITOR = 32
// ReSharper restore InconsistentNaming // ReSharper restore InconsistentNaming
} }
} }
+1 -1
View File
@@ -198,7 +198,7 @@ namespace VocaluxeLib.Log
{ {
if (i >= propertyValues.Length) if (i >= propertyValues.Length)
return match.Value; return match.Value;
return propertyValues[i++].ToString(); return "\"" + propertyValues[i++] + "\"";
}); });
} }
@@ -288,7 +288,9 @@ namespace VocaluxeLib.Menu.SongMenu
public void LeaveSelectedCategory() public void LeaveSelectedCategory()
{ {
_LeaveCategory(); // Stefan1200: This was implemented with the pull request #359 and is the reason for the bug described in issue #390.
// Currently disabled until we know if this is still needed or we find a better solution!
// _LeaveCategory();
} }
public virtual void UnloadSkin() {} public virtual void UnloadSkin() {}
@@ -425,4 +427,4 @@ namespace VocaluxeLib.Menu.SongMenu
} }
#endregion ThemeEdit #endregion ThemeEdit
} }
} }
+21 -4
View File
@@ -511,7 +511,9 @@ namespace VocaluxeLib.Menu.SongMenu
} }
_TextBG.Draw(); _TextBG.Draw();
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null; CTextureRef vidtex = null;
if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
vidtex = (CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null);
if (vidtex != null) if (vidtex != null)
{ {
@@ -592,13 +594,28 @@ namespace VocaluxeLib.Menu.SongMenu
private void _UpdateList(bool force = false) private void _UpdateList(bool force = false)
{ {
bool isInCategory = CBase.Songs.IsInCategory();
int itemCount = isInCategory ? CBase.Songs.GetNumSongsVisible() : CBase.Songs.GetNumCategories();
int halfListLength = _ListLength / 2;
int offset; int offset;
if (_SelectionNr < _Offset && _SelectionNr >= 0) if (_SelectionNr < _Offset && _SelectionNr >= 0)
offset = _SelectionNr; {
if (_SelectionNr - halfListLength >= 0)
offset = _SelectionNr - halfListLength;
else
offset = 0;
}
else if (_SelectionNr >= _Offset + _ListLength) else if (_SelectionNr >= _Offset + _ListLength)
offset = _SelectionNr - _ListLength + 1; {
if (_SelectionNr + halfListLength > itemCount)
offset = itemCount - _ListLength;
else
offset = _SelectionNr - halfListLength;
}
else else
offset = _Offset; offset = _Offset;
_UpdateList(offset, force); _UpdateList(offset, force);
} }
@@ -653,4 +670,4 @@ namespace VocaluxeLib.Menu.SongMenu
base.LoadSkin(); base.LoadSkin();
} }
} }
} }
@@ -485,7 +485,9 @@ namespace VocaluxeLib.Menu.SongMenu
_TextBG.Draw(); _TextBG.Draw();
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null; CTextureRef vidtex = null;
if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
vidtex = (CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null);
if (vidtex != null) if (vidtex != null)
{ {
@@ -608,4 +610,4 @@ namespace VocaluxeLib.Menu.SongMenu
Init(); Init();
} }
} }
} }
+1 -1
View File
@@ -101,7 +101,7 @@ namespace VocaluxeLib.Songs
public readonly List<string> BackgroundFileNames = new List<string>(); public readonly List<string> BackgroundFileNames = new List<string>();
public string VideoFileName = String.Empty; public string VideoFileName = String.Empty;
public EAspect VideoAspect = EAspect.Crop; public EAspect VideoAspect = EAspect.Automatic;
public bool NotesLoaded { get; private set; } public bool NotesLoaded { get; private set; }
+2 -1
View File
@@ -110,6 +110,7 @@ namespace VocaluxeLib.Utils.Player
if (_Video != null || !SongHasVideo) if (_Video != null || !SongHasVideo)
return; return;
string videoFilePath = Path.Combine(_Song.Folder, _Song.VideoFileName); string videoFilePath = Path.Combine(_Song.Folder, _Song.VideoFileName);
_Video = CBase.Video.Load(videoFilePath); _Video = CBase.Video.Load(videoFilePath);
if (_Video == null) if (_Video == null)
@@ -175,4 +176,4 @@ namespace VocaluxeLib.Utils.Player
_CloseVideo(); _CloseVideo();
} }
} }
} }
+5 -5
View File
@@ -9,7 +9,7 @@ platform:
clone_depth: 15 clone_depth: 15
environment: environment:
GitHubKey: GitHubKey:
secure: JSlN/em0JdspVn8jwaQ4IjugY6OQi0au4Qq0rhctJmcfGMaEGnUAOmDFULI48REW secure: sGetWh2XUYs95VBT+QYNPtDW9Rh2/JBuxNNYXytpn7mMudUMcjSKDGErkCTum+ZE
init: init:
- git config --global core.autocrlf true - git config --global core.autocrlf true
install: install:
@@ -63,7 +63,7 @@ before_build:
choco install "msbuild-sonarqube-runner" -y choco install "msbuild-sonarqube-runner" -y
SonarScanner.MSBuild.exe begin ` SonarScanner.MSBuild.exe begin `
/k:"Vocaluxe" ` /k:"Vocaluxe" `
/d:sonar.organization="vocaluxe" ` /o:"vocaluxe" `
/d:sonar.host.url="https://sonarcloud.io" ` /d:sonar.host.url="https://sonarcloud.io" `
/d:sonar.login="$Env:SonarQubeToken" ` /d:sonar.login="$Env:SonarQubeToken" `
/d:"sonar.pullrequest.key=$env:APPVEYOR_PULL_REQUEST_NUMBER" ` /d:"sonar.pullrequest.key=$env:APPVEYOR_PULL_REQUEST_NUMBER" `
@@ -74,7 +74,7 @@ before_build:
choco install "msbuild-sonarqube-runner" -y choco install "msbuild-sonarqube-runner" -y
SonarScanner.MSBuild.exe begin ` SonarScanner.MSBuild.exe begin `
/k:"Vocaluxe" ` /k:"Vocaluxe" `
/d:sonar.organization="vocaluxe" ` /o:"vocaluxe" `
/d:sonar.host.url="https://sonarcloud.io" ` /d:sonar.host.url="https://sonarcloud.io" `
/v:"$Env:GIT_VERSION_TAG" ` /v:"$Env:GIT_VERSION_TAG" `
/d:sonar.login="$Env:SonarQubeToken" ` /d:sonar.login="$Env:SonarQubeToken" `
@@ -135,7 +135,7 @@ deploy:
release: $(APPVEYOR_REPO_TAG_NAME) release: $(APPVEYOR_REPO_TAG_NAME)
description: $(APPVEYOR_REPO_COMMIT) description: $(APPVEYOR_REPO_COMMIT)
auth_token: auth_token:
secure: JSlN/em0JdspVn8jwaQ4IjugY6OQi0au4Qq0rhctJmcfGMaEGnUAOmDFULI48REW secure: sGetWh2XUYs95VBT+QYNPtDW9Rh2/JBuxNNYXytpn7mMudUMcjSKDGErkCTum+ZE
artifact: ReleaseZip artifact: ReleaseZip
prerelease: $(IS_BETA_RELEASE) prerelease: $(IS_BETA_RELEASE)
on: on:
@@ -147,7 +147,7 @@ deploy:
release: Latest Nightly build release: Latest Nightly build
description: $(APPVEYOR_REPO_COMMIT) description: $(APPVEYOR_REPO_COMMIT)
auth_token: auth_token:
secure: JSlN/em0JdspVn8jwaQ4IjugY6OQi0au4Qq0rhctJmcfGMaEGnUAOmDFULI48REW secure: sGetWh2XUYs95VBT+QYNPtDW9Rh2/JBuxNNYXytpn7mMudUMcjSKDGErkCTum+ZE
artifact: ReleaseZip artifact: ReleaseZip
prerelease: true prerelease: true
on: on: