Merge remote-tracking branch 'remotes/flokuep/release-0.3' into release-0.3
This commit is contained in:
commit
248f036e72
11 files changed
+107
-25
No files matched your search
@@ -410,7 +410,7 @@
|
|||||||
<Text>
|
<Text>
|
||||||
<!--<X>, <Y>: Text position-->
|
<!--<X>, <Y>: Text position-->
|
||||||
<X>75</X>
|
<X>75</X>
|
||||||
<Y>16</Y>
|
<Y>12</Y>
|
||||||
<!--<H>: Text height-->
|
<!--<H>: Text height-->
|
||||||
<H>27</H>
|
<H>27</H>
|
||||||
<!--<MaxW>: Maximum text width (if exists)-->
|
<!--<MaxW>: Maximum text width (if exists)-->
|
||||||
@@ -467,7 +467,7 @@
|
|||||||
<Text>
|
<Text>
|
||||||
<!--<X>, <Y>: Text position-->
|
<!--<X>, <Y>: Text position-->
|
||||||
<X>75</X>
|
<X>75</X>
|
||||||
<Y>16</Y>
|
<Y>12</Y>
|
||||||
<!--<H>: Text height-->
|
<!--<H>: Text height-->
|
||||||
<H>27</H>
|
<H>27</H>
|
||||||
<!--<MaxW>: Maximum text width (if exists)-->
|
<!--<MaxW>: Maximum text width (if exists)-->
|
||||||
|
|||||||
@@ -79,9 +79,9 @@
|
|||||||
</Static4>
|
</Static4>
|
||||||
<StaticWebcamOutput>
|
<StaticWebcamOutput>
|
||||||
<!--<Skin>: Texture name-->
|
<!--<Skin>: Texture name-->
|
||||||
<Skin>CoverBackground</Skin>
|
<Skin>Invisible</Skin>
|
||||||
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
|
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
|
||||||
<X>75</X>
|
<X>500</X>
|
||||||
<Y>460</Y>
|
<Y>460</Y>
|
||||||
<Z>0,00</Z>
|
<Z>0,00</Z>
|
||||||
<W>320</W>
|
<W>320</W>
|
||||||
|
|||||||
@@ -568,7 +568,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_BUTTON_EXIT</Text>
|
<Text>TR_BUTTON_BACK</Text>
|
||||||
</Text>
|
</Text>
|
||||||
<!--<Reflection> If exists:-->
|
<!--<Reflection> If exists:-->
|
||||||
<!-- <Space>: Reflection Space-->
|
<!-- <Space>: Reflection Space-->
|
||||||
|
|||||||
@@ -72,9 +72,9 @@ namespace Vocaluxe.Base
|
|||||||
Char firstLetter = Char.ToUpper(songPointer.SortString.Normalize(NormalizationForm.FormD)[0]);
|
Char firstLetter = Char.ToUpper(songPointer.SortString.Normalize(NormalizationForm.FormD)[0]);
|
||||||
if (Char.IsLetter(firstLetter))
|
if (Char.IsLetter(firstLetter))
|
||||||
{
|
{
|
||||||
if (lastCategory == null || songPointer.SortString != lastCategory.Name)
|
if (lastCategory == null || firstLetter.ToString() != lastCategory.Name)
|
||||||
{
|
{
|
||||||
lastCategory = new CCategory(songPointer.SortString);
|
lastCategory = new CCategory(firstLetter.ToString());
|
||||||
_Categories.Add(lastCategory);
|
_Categories.Add(lastCategory);
|
||||||
}
|
}
|
||||||
lastCategory.Songs.Add(songPointer);
|
lastCategory.Songs.Add(songPointer);
|
||||||
|
|||||||
@@ -86,28 +86,28 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
private int _SortByFieldArtistTitle(CSongPointer s1, CSongPointer s2)
|
private int _SortByFieldArtistTitle(CSongPointer s1, CSongPointer s2)
|
||||||
{
|
{
|
||||||
int res = String.Compare(s1.SortString, s2.SortString, StringComparison.OrdinalIgnoreCase);
|
int res = String.Compare(s1.SortString, s2.SortString, StringComparison.CurrentCultureIgnoreCase);
|
||||||
if (res == 0)
|
if (res == 0)
|
||||||
{
|
{
|
||||||
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
|
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
|
||||||
{
|
{
|
||||||
res = String.Compare(CSongs.Songs[s1.SongID].ArtistSorting, CSongs.Songs[s2.SongID].ArtistSorting, StringComparison.OrdinalIgnoreCase);
|
res = String.Compare(CSongs.Songs[s1.SongID].ArtistSorting, CSongs.Songs[s2.SongID].ArtistSorting, StringComparison.CurrentCultureIgnoreCase);
|
||||||
return res != 0 ? res : String.Compare(CSongs.Songs[s1.SongID].TitleSorting, CSongs.Songs[s2.SongID].TitleSorting, StringComparison.OrdinalIgnoreCase);
|
return res != 0 ? res : String.Compare(CSongs.Songs[s1.SongID].TitleSorting, CSongs.Songs[s2.SongID].TitleSorting, StringComparison.CurrentCultureIgnoreCase);
|
||||||
}
|
}
|
||||||
res = String.Compare(CSongs.Songs[s1.SongID].Artist, CSongs.Songs[s2.SongID].Artist, StringComparison.OrdinalIgnoreCase);
|
res = String.Compare(CSongs.Songs[s1.SongID].Artist, CSongs.Songs[s2.SongID].Artist, StringComparison.CurrentCultureIgnoreCase);
|
||||||
return res != 0 ? res : String.Compare(CSongs.Songs[s1.SongID].Title, CSongs.Songs[s2.SongID].Title, StringComparison.OrdinalIgnoreCase);
|
return res != 0 ? res : String.Compare(CSongs.Songs[s1.SongID].Title, CSongs.Songs[s2.SongID].Title, StringComparison.CurrentCultureIgnoreCase);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int _SortByFieldTitle(CSongPointer s1, CSongPointer s2)
|
private int _SortByFieldTitle(CSongPointer s1, CSongPointer s2)
|
||||||
{
|
{
|
||||||
int res = String.Compare(s1.SortString, s2.SortString, StringComparison.OrdinalIgnoreCase);
|
int res = String.Compare(s1.SortString, s2.SortString, StringComparison.CurrentCultureIgnoreCase);
|
||||||
if (res == 0)
|
if (res == 0)
|
||||||
{
|
{
|
||||||
return _IgnoreArticles == EOffOn.TR_CONFIG_ON
|
return _IgnoreArticles == EOffOn.TR_CONFIG_ON
|
||||||
? String.Compare(CSongs.Songs[s1.SongID].TitleSorting, CSongs.Songs[s2.SongID].TitleSorting, StringComparison.OrdinalIgnoreCase) :
|
? String.Compare(CSongs.Songs[s1.SongID].TitleSorting, CSongs.Songs[s2.SongID].TitleSorting, StringComparison.CurrentCultureIgnoreCase) :
|
||||||
String.Compare(CSongs.Songs[s1.SongID].Title, CSongs.Songs[s2.SongID].Title, StringComparison.OrdinalIgnoreCase);
|
String.Compare(CSongs.Songs[s1.SongID].Title, CSongs.Songs[s2.SongID].Title, StringComparison.CurrentCultureIgnoreCase);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
if (_SearchActive)
|
if (_SearchActive)
|
||||||
_ApplyNewSearchFilter(_SearchText + keyEvent.Unicode);
|
_ApplyNewSearchFilter(_SearchText + keyEvent.Unicode);
|
||||||
else
|
else if(!_Sso.Selection.PartyMode)
|
||||||
{
|
{
|
||||||
_JumpTo(keyEvent.Unicode);
|
_JumpTo(keyEvent.Unicode);
|
||||||
return true;
|
return true;
|
||||||
@@ -284,26 +284,32 @@ namespace Vocaluxe.Screens
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.D1:
|
case Keys.D1:
|
||||||
|
case Keys.NumPad1:
|
||||||
_SelectNextRandom(0);
|
_SelectNextRandom(0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.D2:
|
case Keys.D2:
|
||||||
|
case Keys.NumPad2:
|
||||||
_SelectNextRandom(1);
|
_SelectNextRandom(1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.D3:
|
case Keys.D3:
|
||||||
|
case Keys.NumPad3:
|
||||||
_SelectNextRandom(2);
|
_SelectNextRandom(2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.D4:
|
case Keys.D4:
|
||||||
|
case Keys.NumPad4:
|
||||||
_SelectNextRandom(3);
|
_SelectNextRandom(3);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.D5:
|
case Keys.D5:
|
||||||
|
case Keys.NumPad5:
|
||||||
_SelectNextRandom(4);
|
_SelectNextRandom(4);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.D6:
|
case Keys.D6:
|
||||||
|
case Keys.NumPad6:
|
||||||
_SelectNextRandom(5);
|
_SelectNextRandom(5);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -443,9 +449,7 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
if (mouseEvent.LD && !_Sso.Selection.PartyMode)
|
if (mouseEvent.LD && !_Sso.Selection.PartyMode)
|
||||||
{
|
{
|
||||||
//TODO: Causes Bug if you select a song (e.g. with Select random song) and double click a normal button.
|
if (CSongs.NumSongsVisible > 0 && _SongMenus[_SongMenu].GetActualSelection() != -1 && _SongMenus[_SongMenu].IsMouseOverActualSelection(mouseEvent))
|
||||||
//E.g. clicking to fast on Select random song starts the next random song. is this OK?
|
|
||||||
if (CSongs.NumSongsVisible > 0 && _SongMenus[_SongMenu].GetActualSelection() != -1)
|
|
||||||
{
|
{
|
||||||
_ToggleSongOptions(ESongOptionsView.None);
|
_ToggleSongOptions(ESongOptionsView.None);
|
||||||
_StartVisibleSong(_SongMenus[_SongMenu].GetActualSelection());
|
_StartVisibleSong(_SongMenus[_SongMenu].GetActualSelection());
|
||||||
@@ -1003,18 +1007,76 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
int start = 0;
|
int start = 0;
|
||||||
int curSelected = _SongMenus[_SongMenu].GetActualSelection();
|
int curSelected = _SongMenus[_SongMenu].GetActualSelection();
|
||||||
if (CSongs.IsInCategory)
|
bool firstLevel = CConfig.Tabs == EOffOn.TR_CONFIG_OFF && CSongs.IsInCategory;
|
||||||
|
bool secondSort = CConfig.Tabs == EOffOn.TR_CONFIG_ON &&
|
||||||
|
(CConfig.SongSorting == ESongSorting.TR_CONFIG_ARTIST ||
|
||||||
|
CConfig.SongSorting == ESongSorting.TR_CONFIG_ARTIST_LETTER ||
|
||||||
|
CConfig.SongSorting == ESongSorting.TR_CONFIG_FOLDER ||
|
||||||
|
CConfig.SongSorting == ESongSorting.TR_CONFIG_TITLE_LETTER);
|
||||||
|
if (firstLevel && !secondSort)
|
||||||
{
|
{
|
||||||
//TODO: Check and use sorting method
|
//TODO: What's to do with multiple tags?
|
||||||
|
//How can we get current letter? I think we have to save it - Or is there a better method?
|
||||||
ReadOnlyCollection<CSong> songs = CSongs.VisibleSongs;
|
ReadOnlyCollection<CSong> songs = CSongs.VisibleSongs;
|
||||||
int ct = songs.Count;
|
int ct = songs.Count;
|
||||||
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
|
int visibleID = -1;
|
||||||
start = curSelected + 1;
|
switch (CConfig.SongSorting)
|
||||||
int visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
|
{
|
||||||
|
case ESongSorting.TR_CONFIG_ARTIST:
|
||||||
|
case ESongSorting.TR_CONFIG_ARTIST_LETTER:
|
||||||
|
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||||
|
start = curSelected + 1;
|
||||||
|
visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
|
||||||
|
break;
|
||||||
|
|
||||||
|
//TODO: Does this make sense? Maybe we should deactivate this for years? You could only jump between 1 and 2
|
||||||
|
case ESongSorting.TR_CONFIG_YEAR:
|
||||||
|
case ESongSorting.TR_CONFIG_DECADE:
|
||||||
|
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Year.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||||
|
start = curSelected + 1;
|
||||||
|
visibleID = _FindIndex(songs, start, element => element.Year.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ESongSorting.TR_CONFIG_TITLE_LETTER:
|
||||||
|
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||||
|
start = curSelected + 1;
|
||||||
|
visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ESongSorting.TR_CONFIG_FOLDER:
|
||||||
|
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||||
|
start = curSelected + 1;
|
||||||
|
visibleID = _FindIndex(songs, start, element => element.Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (visibleID > -1)
|
if (visibleID > -1)
|
||||||
_SongMenus[_SongMenu].SetSelectedSong(visibleID);
|
_SongMenus[_SongMenu].SetSelectedSong(visibleID);
|
||||||
}
|
}
|
||||||
else
|
else if (secondSort && CSongs.IsInCategory)
|
||||||
|
{
|
||||||
|
ReadOnlyCollection<CSong> songs = CSongs.VisibleSongs;
|
||||||
|
int ct = songs.Count;
|
||||||
|
int visibleID = -1;
|
||||||
|
switch (CConfig.SongSorting)
|
||||||
|
{
|
||||||
|
case ESongSorting.TR_CONFIG_FOLDER:
|
||||||
|
case ESongSorting.TR_CONFIG_TITLE_LETTER:
|
||||||
|
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||||
|
start = curSelected + 1;
|
||||||
|
visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ESongSorting.TR_CONFIG_ARTIST:
|
||||||
|
case ESongSorting.TR_CONFIG_ARTIST_LETTER:
|
||||||
|
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||||
|
start = curSelected + 1;
|
||||||
|
visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (visibleID > -1)
|
||||||
|
_SongMenus[_SongMenu].SetSelectedSong(visibleID);
|
||||||
|
}
|
||||||
|
else if(!CSongs.IsInCategory)
|
||||||
{
|
{
|
||||||
ReadOnlyCollection<CCategory> categories = CSongs.Categories;
|
ReadOnlyCollection<CCategory> categories = CSongs.Categories;
|
||||||
int ct = categories.Count;
|
int ct = categories.Count;
|
||||||
|
|||||||
@@ -199,6 +199,8 @@ namespace VocaluxeLib.Menu
|
|||||||
{
|
{
|
||||||
_Theme.Text = value;
|
_Theme.Text = value;
|
||||||
_Text = translation;
|
_Text = translation;
|
||||||
|
if (_EditMode)
|
||||||
|
_Text += "|";
|
||||||
_PositionNeedsUpdate = true;
|
_PositionNeedsUpdate = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,6 +98,11 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
_SongMenu.SetActive(active);
|
_SongMenu.SetActive(active);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsMouseOverActualSelection(SMouseEvent mEvent)
|
||||||
|
{
|
||||||
|
return _SongMenu.IsMouseOverActualSelection(mEvent);
|
||||||
|
}
|
||||||
|
|
||||||
public int GetSelectedSong()
|
public int GetSelectedSong()
|
||||||
{
|
{
|
||||||
return _SongMenu.GetSelectedSong();
|
return _SongMenu.GetSelectedSong();
|
||||||
|
|||||||
@@ -518,6 +518,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
_Active = active;
|
_Active = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual bool IsMouseOverActualSelection(SMouseEvent mEvent) { return false; }
|
||||||
|
|
||||||
public virtual int GetSelectedSong()
|
public virtual int GetSelectedSong()
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -485,6 +485,15 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
return _Locked;
|
return _Locked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool IsMouseOverActualSelection(SMouseEvent mEvent)
|
||||||
|
{
|
||||||
|
CStatic selCov = GetSelectedSongCover();
|
||||||
|
if (selCov.Texture == null)
|
||||||
|
return false;
|
||||||
|
SRectF rect = new SRectF(selCov.Rect.X - selCov.Rect.W*0.2f, selCov.Rect.Y - selCov.Rect.H*0.2f, selCov.Rect.W*1.2f, selCov.Rect.H*1.2f, selCov.Rect.Z);
|
||||||
|
return CHelper.IsInBounds(rect, mEvent);
|
||||||
|
}
|
||||||
|
|
||||||
public override CStatic GetSelectedSongCover()
|
public override CStatic GetSelectedSongCover()
|
||||||
{
|
{
|
||||||
foreach (CStatic tile in _Tiles)
|
foreach (CStatic tile in _Tiles)
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
bool IsActive();
|
bool IsActive();
|
||||||
void SetActive(bool active);
|
void SetActive(bool active);
|
||||||
|
|
||||||
|
bool IsMouseOverActualSelection(SMouseEvent mEvent);
|
||||||
|
|
||||||
int GetSelectedCategory();
|
int GetSelectedCategory();
|
||||||
void SetSelectedCategory(int categoryNr);
|
void SetSelectedCategory(int categoryNr);
|
||||||
int GetActualSelection();
|
int GetActualSelection();
|
||||||
|
|||||||
Reference in new issue
Block a user