Merge branch 'develop' into newAcinerella42

This commit is contained in:
Stefan authored and GitHub committed 2020-02-09 12:11:58 +01:00
commit 7ee7aa2df7
19 files changed
+218 -36

No files matched your search

+1
View File
@@ -140,6 +140,7 @@ Song screen
[CTRL] + [A] to sing all songs [CTRL] + [A] to sing all songs
[CTRL] + [S] to sing current song in medley version [CTRL] + [S] to sing current song in medley version
[CTRL] + [V] to sing all songs from a category [CTRL] + [V] to sing all songs from a category
[CTRL] + [L] to filter the song list to the current displayed playlist. Press again to remove this filter.
[NUM_1]..[NUM_6] to use a Joker for team 1..6 [NUM_1]..[NUM_6] to use a Joker for team 1..6
[A]..[Z] to jump to category/song title starting with that letters (multiple letters possible) [A]..[Z] to jump to category/song title starting with that letters (multiple letters possible)
[PAGE UP] or [PAGE DOWN] to scroll one page up/down [PAGE UP] or [PAGE DOWN] to scroll one page up/down
@@ -1,5 +1,28 @@
ScreenSong ScreenSong
++++++++++
Version 10:
Add:
<ButtonPlaylistList>
++++++++++
Version 9:
Add:
<TextSongYear>
Changed values at:
<TextSongLength>
++++++++++
Version 8:
Add:
<ButtonOptionsHighscore> to SongMenu
<TextShortInfoTop>
<StaticShortInfoTop>
++++++++++ ++++++++++
Version 7: Version 7:
+1
View File
@@ -353,6 +353,7 @@
<DeleteIcon>DeleteIcon.png</DeleteIcon> <DeleteIcon>DeleteIcon.png</DeleteIcon>
<SaveIcon>SaveIcon.png</SaveIcon> <SaveIcon>SaveIcon.png</SaveIcon>
<SingIcon>SingIcon.png</SingIcon> <SingIcon>SingIcon.png</SingIcon>
<ListIcon>ListIcon.png</ListIcon>
<Minus>MinusIcon.png</Minus> <Minus>MinusIcon.png</Minus>
<Plus>PlusIcon.png</Plus> <Plus>PlusIcon.png</Plus>
<VolUp>VolUp.png</VolUp> <VolUp>VolUp.png</VolUp>
+1
View File
@@ -353,6 +353,7 @@
<DeleteIcon>DeleteIcon.png</DeleteIcon> <DeleteIcon>DeleteIcon.png</DeleteIcon>
<SaveIcon>SaveIcon.png</SaveIcon> <SaveIcon>SaveIcon.png</SaveIcon>
<SingIcon>SingIcon.png</SingIcon> <SingIcon>SingIcon.png</SingIcon>
<ListIcon>ListIcon.png</ListIcon>
<Minus>MinusIcon.png</Minus> <Minus>MinusIcon.png</Minus>
<Plus>PlusIcon.png</Plus> <Plus>PlusIcon.png</Plus>
<VolUp>VolUp.png</VolUp> <VolUp>VolUp.png</VolUp>
+1
View File
@@ -353,6 +353,7 @@
<DeleteIcon>DeleteIcon.png</DeleteIcon> <DeleteIcon>DeleteIcon.png</DeleteIcon>
<SaveIcon>SaveIcon.png</SaveIcon> <SaveIcon>SaveIcon.png</SaveIcon>
<SingIcon>SingIcon.png</SingIcon> <SingIcon>SingIcon.png</SingIcon>
<ListIcon>ListIcon.png</ListIcon>
<Minus>MinusIcon.png</Minus> <Minus>MinusIcon.png</Minus>
<Plus>PlusIcon.png</Plus> <Plus>PlusIcon.png</Plus>
<VolUp>VolUp.png</VolUp> <VolUp>VolUp.png</VolUp>
Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

+66 -11
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>8</ScreenVersion> <ScreenVersion>10</ScreenVersion>
</Informations> </Informations>
<Backgrounds> <Backgrounds>
<Background Name="Background1"> <Background Name="Background1">
@@ -905,19 +905,33 @@
<Text /> <Text />
</TextTitle> </TextTitle>
<TextSongLength Name="TextSongLength"> <TextSongLength Name="TextSongLength">
<X>222</X> <X>391</X>
<Y>490</Y> <Y>490</Y>
<Z>-1.01</Z> <Z>-1.01</Z>
<H>28</H> <H>28</H>
<MaxW>340</MaxW> <MaxW>100</MaxW>
<Color Name="TextColor" /> <Color Name="TextColor" />
<SelColor Name="TextSelColor" /> <SelColor Name="TextSelColor" />
<Align>Center</Align> <Align>Right</Align>
<ResizeAlign>Top</ResizeAlign> <ResizeAlign>Top</ResizeAlign>
<Style>Bold</Style> <Style>Bold</Style>
<Font>Outline</Font> <Font>Outline</Font>
<Text /> <Text />
</TextSongLength> </TextSongLength>
<TextSongYear Name="TextSongYear">
<X>52</X>
<Y>490</Y>
<Z>-1.01</Z>
<H>28</H>
<MaxW>100</MaxW>
<Color Name="TextColor" />
<SelColor Name="TextSelColor" />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Bold</Style>
<Font>Outline</Font>
<Text />
</TextSongYear>
<StaticCoverBig Name="StaticCoverBig"> <StaticCoverBig Name="StaticCoverBig">
<Skin /> <Skin />
<Color Name="Visible" /> <Color Name="Visible" />
@@ -990,16 +1004,16 @@
<SpaceW>10</SpaceW> <SpaceW>10</SpaceW>
<SpaceH>10</SpaceH> <SpaceH>10</SpaceH>
<TileRect> <TileRect>
<X>375</X> <X>410</X>
<Y>42</Y> <Y>42</Y>
<W>850</W> <W>830</W>
<H>555</H> <H>555</H>
<Z>-1</Z> <Z>-1</Z>
</TileRect> </TileRect>
<TileRectSmall> <TileRectSmall>
<X>375</X> <X>410</X>
<Y>42</Y> <Y>42</Y>
<W>450</W> <W>410</W>
<H>550</H> <H>550</H>
<Z>-1</Z> <Z>-1</Z>
</TileRectSmall> </TileRectSmall>
@@ -1032,19 +1046,33 @@
<Text /> <Text />
</TextTitle> </TextTitle>
<TextSongLength Name="TextSongLength"> <TextSongLength Name="TextSongLength">
<X>222</X> <X>391</X>
<Y>490</Y> <Y>490</Y>
<Z>-1.01</Z> <Z>-1.01</Z>
<H>28</H> <H>28</H>
<MaxW>340</MaxW> <MaxW>100</MaxW>
<Color Name="TextColor" /> <Color Name="TextColor" />
<SelColor Name="TextSelColor" /> <SelColor Name="TextSelColor" />
<Align>Center</Align> <Align>Right</Align>
<ResizeAlign>Top</ResizeAlign> <ResizeAlign>Top</ResizeAlign>
<Style>Bold</Style> <Style>Bold</Style>
<Font>Outline</Font> <Font>Outline</Font>
<Text /> <Text />
</TextSongLength> </TextSongLength>
<TextSongYear Name="TextSongYear">
<X>52</X>
<Y>490</Y>
<Z>-1.01</Z>
<H>28</H>
<MaxW>100</MaxW>
<Color Name="TextColor" />
<SelColor Name="TextSelColor" />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Bold</Style>
<Font>Outline</Font>
<Text />
</TextSongYear>
<StaticCoverBig Name="StaticCoverBig"> <StaticCoverBig Name="StaticCoverBig">
<Skin /> <Skin />
<Color Name="Visible" /> <Color Name="Visible" />
@@ -1432,6 +1460,33 @@
<Text /> <Text />
</Text> </Text>
</ButtonPlaylistSave> </ButtonPlaylistSave>
<ButtonPlaylistList Name="ButtonPlaylistList">
<Skin>ListIcon</Skin>
<SkinSelected>ListIcon</SkinSelected>
<Rect>
<X>1120</X>
<Y>548</Y>
<W>35</W>
<H>35</H>
<Z>-1.01</Z>
</Rect>
<Color Name="ButtonColor" />
<SelColor Name="ButtonSelColor" />
<Text Name="Text">
<X>180</X>
<Y>5</Y>
<Z>0</Z>
<H>25</H>
<MaxW>350</MaxW>
<Color Name="ButtonTextColor" />
<SelColor Name="ButtonTextSelColor" />
<Align>Center</Align>
<ResizeAlign>Center</ResizeAlign>
<Style>Bold</Style>
<Font>Outline</Font>
<Text />
</Text>
</ButtonPlaylistList>
<ButtonPlaylistDelete Name="ButtonPlaylistDelete"> <ButtonPlaylistDelete Name="ButtonPlaylistDelete">
<Skin>DeleteIcon</Skin> <Skin>DeleteIcon</Skin>
<SkinSelected>DeleteIcon</SkinSelected> <SkinSelected>DeleteIcon</SkinSelected>
+1 -1
View File
@@ -688,7 +688,7 @@ namespace Vocaluxe.Base
{ {
//Check if folder exists //Check if folder exists
if (Directory.Exists(folder)) if (Directory.Exists(folder))
SongFolders.Add(folder); SongFolders.Add(Path.GetFullPath(folder));
} }
} }
+5
View File
@@ -964,6 +964,11 @@ namespace Vocaluxe.Base
CPlaylists.SetName(playlistID, name); CPlaylists.SetName(playlistID, name);
} }
public List<int> GetIds()
{
return CPlaylists.Ids;
}
public List<string> GetNames() public List<string> GetNames()
{ {
return CPlaylists.Names; return CPlaylists.Names;
+13 -3
View File
@@ -267,9 +267,15 @@ namespace Vocaluxe.Screens
if (_Buttons[_ButtonCancel].Selected) if (_Buttons[_ButtonCancel].Selected)
_Stop(); _Stop();
if (_Buttons[_ButtonRestartGame].Selected) if (_Buttons[_ButtonRestartGame].Selected)
{
_RestartGame(); _RestartGame();
_SetPause(false);
}
if (_Buttons[_ButtonRestartRound].Selected) if (_Buttons[_ButtonRestartRound].Selected)
{
_RestartRound(); _RestartRound();
_SetPause(false);
}
if (_Buttons[_ButtonSkip].Selected) if (_Buttons[_ButtonSkip].Selected)
{ {
_NextSong(); _NextSong();
@@ -836,7 +842,7 @@ namespace Vocaluxe.Screens
SRectF bounds = CSettings.RenderRect; SRectF bounds = CSettings.RenderRect;
if (_VideoAspect == EAspect.Automatic) if (_VideoAspect == EAspect.Automatic)
_VideoAspect = (background.OrigAspect <= 1.5 ? EAspect.LetterBox : EAspect.Crop); _VideoAspect = ((background.OrigAspect <= 1.5 || background.OrigAspect >= 1.9) ? EAspect.LetterBox : EAspect.Crop);
aspect = _VideoAspect; aspect = _VideoAspect;
SRectF rect = CHelper.FitInBounds(bounds, background.OrigAspect, aspect); SRectF rect = CHelper.FitInBounds(bounds, background.OrigAspect, aspect);
@@ -1119,7 +1125,7 @@ namespace Vocaluxe.Screens
voiceAssignments[i] = CGame.Players[i].VoiceNr; voiceAssignments[i] = CGame.Players[i].VoiceNr;
} }
_VideoAspect = EAspect.Automatic; _VideoAspect = song.VideoAspect;
if (!String.IsNullOrEmpty(song.VideoFileName)) if (!String.IsNullOrEmpty(song.VideoFileName))
{ {
_CurrentVideo = CVideo.Load(Path.Combine(song.Folder, song.VideoFileName)); _CurrentVideo = CVideo.Load(Path.Combine(song.Folder, song.VideoFileName));
@@ -1181,7 +1187,11 @@ namespace Vocaluxe.Screens
_TimerDuetText1.Reset(); _TimerDuetText1.Reset();
_TimerDuetText2.Reset(); _TimerDuetText2.Reset();
float realGap = song.Gap - song.Start; // Getting the real start of the first line from the first voice, no other voices are on top since #454.
// Needed for displaying song name on duet game mode or lyric on top settings (implemented with #455).
CVoice voice = song.Notes.GetVoice(0); // As long as only voice 0 is on top (no matter if duet or other modes).
CSongLine[] lines = voice.Lines;
float realGap = CGame.GetTimeFromBeats(lines[0].FirstNoteBeat, song.BPM) + (song.Gap - song.Start);
_TimeShowSongTextTotal = 10f; _TimeShowSongTextTotal = 10f;
if (_Lyrics[_LyricMainDuet].Visible || _Lyrics[_LyricMainTop].Visible) if (_Lyrics[_LyricMainDuet].Visible || _Lyrics[_LyricMainTop].Visible)
{ {
+39 -9
View File
@@ -43,7 +43,7 @@ namespace Vocaluxe.Screens
// Version number for theme files. Increment it, if you've changed something on the theme files! // Version number for theme files. Increment it, if you've changed something on the theme files!
protected override int _ScreenVersion protected override int _ScreenVersion
{ {
get { return 8; } get { return 10; }
} }
private const string _TextCategory = "TextCategory"; private const string _TextCategory = "TextCategory";
@@ -217,6 +217,11 @@ namespace Vocaluxe.Screens
keyEvent.Handled = true; keyEvent.Handled = true;
return true; return true;
} }
if (keyEvent.Key == Keys.Enter && _Playlist.isButtonPlaylistListSelected())
{
_TogglePlaylistFilter();
return true;
}
} }
// Playlist selection is handled below not in base! // Playlist selection is handled below not in base!
@@ -363,13 +368,20 @@ namespace Vocaluxe.Screens
_ShowHighscore(); _ShowHighscore();
} }
break; break;
case Keys.L:
if (keyEvent.Mod == EModifier.Ctrl)
{
_TogglePlaylistFilter();
}
break;
} }
if (!_SearchActive) if (!_SearchActive)
{ {
switch (keyEvent.Key) switch (keyEvent.Key)
{ {
case Keys.Space: case Keys.Space:
if (!_Sso.Selection.PartyMode) if (!_Sso.Selection.PartyMode && !_Playlist.isPlaylistNameEditMode())
_ToggleSongOptions(ESongOptionsView.General); _ToggleSongOptions(ESongOptionsView.General);
break; break;
@@ -499,6 +511,11 @@ namespace Vocaluxe.Screens
_SongMenu.SmallView = false; _SongMenu.SmallView = false;
return true; return true;
} }
if (mouseEvent.LB && _Playlist.isButtonPlaylistListSelected())
{
_TogglePlaylistFilter();
return true;
}
} }
else if (CHelper.IsInBounds(_SongMenu.Rect, mouseEvent)) else if (CHelper.IsInBounds(_SongMenu.Rect, mouseEvent))
{ {
@@ -869,9 +886,6 @@ namespace Vocaluxe.Screens
CParty.OnSongChange(_SelectedSongID, ref _Sso); CParty.OnSongChange(_SelectedSongID, ref _Sso);
} }
_Sso = CParty.GetSongSelectionOptions();
if (_Sso.Selection.PartyMode) if (_Sso.Selection.PartyMode)
{ {
CSongs.Sort(_Sso.Sorting.SongSorting, _Sso.Sorting.Tabs, _Sso.Sorting.IgnoreArticles, _Sso.Sorting.SearchString, _Sso.Sorting.DuetOptions, _Sso.Sorting.FilterPlaylistID); CSongs.Sort(_Sso.Sorting.SongSorting, _Sso.Sorting.Tabs, _Sso.Sorting.IgnoreArticles, _Sso.Sorting.SearchString, _Sso.Sorting.DuetOptions, _Sso.Sorting.FilterPlaylistID);
@@ -1202,7 +1216,7 @@ namespace Vocaluxe.Screens
{ {
case ESongSorting.TR_CONFIG_ARTIST: case ESongSorting.TR_CONFIG_ARTIST:
case ESongSorting.TR_CONFIG_ARTIST_LETTER: case ESongSorting.TR_CONFIG_ARTIST_LETTER:
visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); visibleID = _FindIndex(songs, start, element => (_Sso.Sorting.IgnoreArticles == EOffOn.TR_CONFIG_ON ? element.ArtistSorting.StartsWith(searchString, StringComparison.OrdinalIgnoreCase) : element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)));
break; break;
case ESongSorting.TR_CONFIG_YEAR: case ESongSorting.TR_CONFIG_YEAR:
@@ -1211,7 +1225,7 @@ namespace Vocaluxe.Screens
break; break;
case ESongSorting.TR_CONFIG_TITLE_LETTER: case ESongSorting.TR_CONFIG_TITLE_LETTER:
visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); visibleID = _FindIndex(songs, start, element => (_Sso.Sorting.IgnoreArticles == EOffOn.TR_CONFIG_ON ? element.TitleSorting.StartsWith(searchString, StringComparison.OrdinalIgnoreCase) : element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)));
break; break;
case ESongSorting.TR_CONFIG_FOLDER: case ESongSorting.TR_CONFIG_FOLDER:
@@ -1229,12 +1243,12 @@ namespace Vocaluxe.Screens
{ {
case ESongSorting.TR_CONFIG_FOLDER: case ESongSorting.TR_CONFIG_FOLDER:
case ESongSorting.TR_CONFIG_TITLE_LETTER: case ESongSorting.TR_CONFIG_TITLE_LETTER:
visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); visibleID = _FindIndex(songs, start, element => (_Sso.Sorting.IgnoreArticles == EOffOn.TR_CONFIG_ON ? element.ArtistSorting.StartsWith(searchString, StringComparison.OrdinalIgnoreCase) : element.Artist.StartsWith(searchString, 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:
visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); visibleID = _FindIndex(songs, start, element => (_Sso.Sorting.IgnoreArticles == EOffOn.TR_CONFIG_ON ? element.TitleSorting.StartsWith(searchString, StringComparison.OrdinalIgnoreCase) : element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)));
break; break;
} }
if (visibleID > -1) if (visibleID > -1)
@@ -1253,6 +1267,22 @@ namespace Vocaluxe.Screens
_JumpTo_lastSearchString = searchString; _JumpTo_lastSearchString = searchString;
} }
public void _TogglePlaylistFilter()
{
if (_Sso.Sorting.FilterPlaylistID == _Playlist.ActivePlaylistID)
{
if (_Playlist.ActivePlaylistID == -1)
return;
_Sso.Sorting.FilterPlaylistID = -1;
}
else
_Sso.Sorting.FilterPlaylistID = _Playlist.ActivePlaylistID;
CSongs.Sort(_Sso.Sorting.SongSorting, _Sso.Sorting.Tabs, _Sso.Sorting.IgnoreArticles, _Sso.Sorting.SearchString, _Sso.Sorting.DuetOptions, _Sso.Sorting.FilterPlaylistID);
_SongMenu.OnShow();
}
private void _ApplyNewSearchFilter(string newFilterString) private void _ApplyNewSearchFilter(string newFilterString)
{ {
CParty.SetSearchString(newFilterString, _SearchActive); CParty.SetSearchString(newFilterString, _SearchActive);
+4 -4
View File
@@ -171,10 +171,10 @@ namespace VocaluxeLib
public static SRectF Scale(this SRectF rect, float scale) public static SRectF Scale(this SRectF rect, float scale)
{ {
return new SRectF( return new SRectF(
rect.X - rect.W * (scale - 1f), rect.X - rect.W * (scale - 1f) * 0.5f,
rect.Y - rect.H * (scale - 1f), rect.Y - rect.H * (scale - 1f) * 0.5f,
rect.W + 2 * rect.W * (scale - 1f), rect.W * scale,
rect.H + 2 * rect.H * (scale - 1f), rect.H * scale,
rect.Z); rect.Z);
} }
+1
View File
@@ -304,6 +304,7 @@ namespace VocaluxeLib
{ {
bool Exists(int playlistID); bool Exists(int playlistID);
string GetName(int playlistID); string GetName(int playlistID);
List<int> GetIds();
List<string> GetNames(); List<string> GetNames();
void SetName(int playlistID, string name); void SetName(int playlistID, string name);
+10 -1
View File
@@ -100,6 +100,8 @@ namespace VocaluxeLib.Menu
protected int NumMinMedleySongs = 3; protected int NumMinMedleySongs = 3;
protected int NumMaxMedleySongs = 10; protected int NumMaxMedleySongs = 10;
private List<int> _PlaylistIDs;
public override void Init() public override void Init()
{ {
base.Init(); base.Init();
@@ -188,6 +190,8 @@ namespace VocaluxeLib.Menu
_SelectSlides[_SelectSlideSorting].AddValue(ss.ToString()); _SelectSlides[_SelectSlideSorting].AddValue(ss.ToString());
_SelectSlides[_SelectSlidePlaylist].Clear(); _SelectSlides[_SelectSlidePlaylist].Clear();
_SelectSlides[_SelectSlidePlaylist].NumVisible = 1; // Make sure that only one playlist at a time will be displayed (or the names overlap)
_PlaylistIDs = CBase.Playlist.GetIds();
List<string> playlists = CBase.Playlist.GetNames(); List<string> playlists = CBase.Playlist.GetNames();
for (int i = 0; i < playlists.Count; i++) for (int i = 0; i < playlists.Count; i++)
{ {
@@ -220,7 +224,12 @@ namespace VocaluxeLib.Menu
_SongMode = _SelectSlides[_SelectSlideSongMode].Selection; _SongMode = _SelectSlides[_SelectSlideSongMode].Selection;
_Source = _SelectSlides[_SelectSlideSource].Selection; _Source = _SelectSlides[_SelectSlideSource].Selection;
NumMedleySongs = NumMinMedleySongs + _SelectSlides[_SelectSlideNumMedleySongs].Selection; NumMedleySongs = NumMinMedleySongs + _SelectSlides[_SelectSlideNumMedleySongs].Selection;
Playlist = _SelectSlides[_SelectSlidePlaylist].Selection;
int playlistSelection = _SelectSlides[_SelectSlidePlaylist].Selection;
if (playlistSelection >= 0 && playlistSelection < _PlaylistIDs.Count)
Playlist = _PlaylistIDs[playlistSelection];
else
Playlist = -1;
if (_SelectSlides[_SelectSlideSorting].Selection != _Sorting) if (_SelectSlides[_SelectSlideSorting].Selection != _Sorting)
{ {
+33 -2
View File
@@ -81,6 +81,7 @@ namespace VocaluxeLib.Menu
public SThemeButton ButtonPlaylistSave; public SThemeButton ButtonPlaylistSave;
public SThemeButton ButtonPlaylistDelete; public SThemeButton ButtonPlaylistDelete;
public SThemeButton ButtonPlaylistSing; public SThemeButton ButtonPlaylistSing;
public SThemeButton ButtonPlaylistList;
public SThemeSelectSlide SelectSlideGameMode; public SThemeSelectSlide SelectSlideGameMode;
} }
@@ -163,6 +164,7 @@ namespace VocaluxeLib.Menu
private readonly CButton _ButtonPlaylistSave; private readonly CButton _ButtonPlaylistSave;
private readonly CButton _ButtonPlaylistDelete; private readonly CButton _ButtonPlaylistDelete;
private readonly CButton _ButtonPlaylistSing; private readonly CButton _ButtonPlaylistSing;
private readonly CButton _ButtonPlaylistList;
private readonly CText _Text1; private readonly CText _Text1;
private readonly CSelectSlide _SelectSlideGameMode; private readonly CSelectSlide _SelectSlideGameMode;
private readonly CStatic _StaticPlaylistHeader; private readonly CStatic _StaticPlaylistHeader;
@@ -235,6 +237,7 @@ namespace VocaluxeLib.Menu
_ButtonPlaylistDelete = new CButton(_PartyModeID); _ButtonPlaylistDelete = new CButton(_PartyModeID);
_ButtonPlaylistSave = new CButton(_PartyModeID); _ButtonPlaylistSave = new CButton(_PartyModeID);
_ButtonPlaylistSing = new CButton(_PartyModeID); _ButtonPlaylistSing = new CButton(_PartyModeID);
_ButtonPlaylistList = new CButton(_PartyModeID);
_SelectSlideGameMode = new CSelectSlide(_PartyModeID); _SelectSlideGameMode = new CSelectSlide(_PartyModeID);
Visible = false; Visible = false;
@@ -254,6 +257,7 @@ namespace VocaluxeLib.Menu
_ButtonPlaylistDelete = new CButton(_Theme.ButtonPlaylistDelete, _PartyModeID); _ButtonPlaylistDelete = new CButton(_Theme.ButtonPlaylistDelete, _PartyModeID);
_ButtonPlaylistSave = new CButton(_Theme.ButtonPlaylistSave, _PartyModeID); _ButtonPlaylistSave = new CButton(_Theme.ButtonPlaylistSave, _PartyModeID);
_ButtonPlaylistSing = new CButton(_Theme.ButtonPlaylistSing, _PartyModeID); _ButtonPlaylistSing = new CButton(_Theme.ButtonPlaylistSing, _PartyModeID);
_ButtonPlaylistList = new CButton(_Theme.ButtonPlaylistList, _PartyModeID);
_SelectSlideGameMode = new CSelectSlide(_Theme.SelectSlideGameMode, _PartyModeID); _SelectSlideGameMode = new CSelectSlide(_Theme.SelectSlideGameMode, _PartyModeID);
_AddStatic(_StaticPlaylistFooter); _AddStatic(_StaticPlaylistFooter);
@@ -263,6 +267,7 @@ namespace VocaluxeLib.Menu
_AddButton(_ButtonPlaylistDelete); _AddButton(_ButtonPlaylistDelete);
_AddButton(_ButtonPlaylistSave); _AddButton(_ButtonPlaylistSave);
_AddButton(_ButtonPlaylistSing); _AddButton(_ButtonPlaylistSing);
_AddButton(_ButtonPlaylistList);
Visible = false; Visible = false;
Selected = false; Selected = false;
@@ -279,6 +284,7 @@ namespace VocaluxeLib.Menu
_Theme.ButtonPlaylistClose = (SThemeButton)_ButtonPlaylistClose.GetTheme(); _Theme.ButtonPlaylistClose = (SThemeButton)_ButtonPlaylistClose.GetTheme();
_Theme.ButtonPlaylistSave = (SThemeButton)_ButtonPlaylistSave.GetTheme(); _Theme.ButtonPlaylistSave = (SThemeButton)_ButtonPlaylistSave.GetTheme();
_Theme.ButtonPlaylistDelete = (SThemeButton)_ButtonPlaylistDelete.GetTheme(); _Theme.ButtonPlaylistDelete = (SThemeButton)_ButtonPlaylistDelete.GetTheme();
_Theme.ButtonPlaylistList = (SThemeButton)_ButtonPlaylistList.GetTheme();
} }
public void UpdateGame() public void UpdateGame()
@@ -321,6 +327,7 @@ namespace VocaluxeLib.Menu
_ButtonPlaylistName.UnloadSkin(); _ButtonPlaylistName.UnloadSkin();
_ButtonPlaylistSave.UnloadSkin(); _ButtonPlaylistSave.UnloadSkin();
_ButtonPlaylistSing.UnloadSkin(); _ButtonPlaylistSing.UnloadSkin();
_ButtonPlaylistList.UnloadSkin();
_StaticPlaylistFooter.UnloadSkin(); _StaticPlaylistFooter.UnloadSkin();
_StaticPlaylistHeader.UnloadSkin(); _StaticPlaylistHeader.UnloadSkin();
@@ -342,6 +349,7 @@ namespace VocaluxeLib.Menu
_ButtonPlaylistName.LoadSkin(); _ButtonPlaylistName.LoadSkin();
_ButtonPlaylistSave.LoadSkin(); _ButtonPlaylistSave.LoadSkin();
_ButtonPlaylistSing.LoadSkin(); _ButtonPlaylistSing.LoadSkin();
_ButtonPlaylistList.LoadSkin();
_StaticPlaylistFooter.LoadSkin(); _StaticPlaylistFooter.LoadSkin();
_StaticPlaylistHeader.LoadSkin(); _StaticPlaylistHeader.LoadSkin();
@@ -492,7 +500,7 @@ namespace VocaluxeLib.Menu
break; break;
case Keys.Enter: case Keys.Enter:
_StartPlaylistSong(_CurrentPlaylistElement); _StartPlaylistSong(_CurrentPlaylistElement + _Offset);
break; break;
case Keys.Add: //move the selected song up case Keys.Add: //move the selected song up
@@ -640,6 +648,8 @@ namespace VocaluxeLib.Menu
_StartPlaylistSongs(); _StartPlaylistSongs();
else if (_ButtonPlaylistSave.Selected) else if (_ButtonPlaylistSave.Selected)
CBase.Playlist.Save(ActivePlaylistID); CBase.Playlist.Save(ActivePlaylistID);
else if (isButtonPlaylistListSelected())
return false; // Currently CScreenSong do this event!
else if (_ButtonPlaylistDelete.Selected) else if (_ButtonPlaylistDelete.Selected)
{ {
CBase.Playlist.Delete(ActivePlaylistID); CBase.Playlist.Delete(ActivePlaylistID);
@@ -672,6 +682,11 @@ namespace VocaluxeLib.Menu
return true; return true;
} }
public bool isButtonPlaylistListSelected()
{
return _ButtonPlaylistList.Selected;
}
private void _SetSelectionToLastEntry() private void _SetSelectionToLastEntry()
{ {
if (_PlaylistElementContents.Count == 0) if (_PlaylistElementContents.Count == 0)
@@ -781,6 +796,8 @@ namespace VocaluxeLib.Menu
//LB actions //LB actions
if (mouseEvent.LB) if (mouseEvent.LB)
{ {
if (isButtonPlaylistListSelected())
return false; // Currently CScreenSong do this event!
if (_CurrentPlaylistElement != -1) if (_CurrentPlaylistElement != -1)
{ {
CBase.Playlist.GetSong(ActivePlaylistID, _CurrentPlaylistElement + _Offset).GameMode = CBase.Playlist.GetSong(ActivePlaylistID, _CurrentPlaylistElement + _Offset).GameMode =
@@ -818,7 +835,7 @@ namespace VocaluxeLib.Menu
//Start selected song with double click //Start selected song with double click
if (mouseEvent.LD && _CurrentPlaylistElement != -1) if (mouseEvent.LD && _CurrentPlaylistElement != -1)
_StartPlaylistSong(_CurrentPlaylistElement); _StartPlaylistSong(_CurrentPlaylistElement + _Offset);
//Change order with holding LB //Change order with holding LB
if (mouseEvent.LBH && _CurrentPlaylistElement != -1 && _PlaylistElementContents.Count > 0 && DragAndDropSongID == -1) if (mouseEvent.LBH && _CurrentPlaylistElement != -1 && _PlaylistElementContents.Count > 0 && DragAndDropSongID == -1)
@@ -972,6 +989,11 @@ namespace VocaluxeLib.Menu
return false; return false;
} }
public bool isPlaylistNameEditMode()
{
return _EditMode == EEditMode.PlaylistName;
}
private void _PrepareList() private void _PrepareList()
{ {
_PlaylistElements.Clear(); _PlaylistElements.Clear();
@@ -1166,6 +1188,15 @@ namespace VocaluxeLib.Menu
_CompleteRect.W = _ButtonPlaylistDelete.Rect.W + _ButtonPlaylistDelete.Rect.X - _CompleteRect.X; _CompleteRect.W = _ButtonPlaylistDelete.Rect.W + _ButtonPlaylistDelete.Rect.X - _CompleteRect.X;
if (_ButtonPlaylistDelete.Rect.Y + _ButtonPlaylistDelete.Rect.H > _CompleteRect.Y + _CompleteRect.H) if (_ButtonPlaylistDelete.Rect.Y + _ButtonPlaylistDelete.Rect.H > _CompleteRect.Y + _CompleteRect.H)
_CompleteRect.H = _ButtonPlaylistDelete.Rect.H + _ButtonPlaylistDelete.Rect.Y - _CompleteRect.Y; _CompleteRect.H = _ButtonPlaylistDelete.Rect.H + _ButtonPlaylistDelete.Rect.Y - _CompleteRect.Y;
//ButtonPlaylistList
if (_ButtonPlaylistList.Rect.X < _CompleteRect.X)
_CompleteRect.X = _ButtonPlaylistList.Rect.X;
if (_ButtonPlaylistList.Rect.Y < _CompleteRect.Y)
_CompleteRect.Y = _ButtonPlaylistList.Rect.Y;
if (_ButtonPlaylistList.Rect.W + _ButtonPlaylistList.Rect.X > _CompleteRect.W + _CompleteRect.X)
_CompleteRect.W = _ButtonPlaylistList.Rect.W + _ButtonPlaylistList.Rect.X - _CompleteRect.X;
if (_ButtonPlaylistList.Rect.Y + _ButtonPlaylistList.Rect.H > _CompleteRect.Y + _CompleteRect.H)
_CompleteRect.H = _ButtonPlaylistList.Rect.H + _ButtonPlaylistList.Rect.Y - _CompleteRect.Y;
} }
#region ThemeEdit #region ThemeEdit
@@ -63,6 +63,7 @@ namespace VocaluxeLib.Menu.SongMenu
public SThemeText TextArtist; public SThemeText TextArtist;
public SThemeText TextTitle; public SThemeText TextTitle;
public SThemeText TextSongLength; public SThemeText TextSongLength;
public SThemeText TextSongYear;
public SThemeStatic StaticCoverBig; public SThemeStatic StaticCoverBig;
public SThemeStatic StaticTextBG; public SThemeStatic StaticTextBG;
@@ -111,6 +112,7 @@ namespace VocaluxeLib.Menu.SongMenu
public SThemeText TextArtist; public SThemeText TextArtist;
public SThemeText TextTitle; public SThemeText TextTitle;
public SThemeText TextSongLength; public SThemeText TextSongLength;
public SThemeText TextSongYear;
public SThemeStatic StaticCoverBig; public SThemeStatic StaticCoverBig;
public SThemeStatic StaticTextBG; public SThemeStatic StaticTextBG;
+8 -3
View File
@@ -43,6 +43,7 @@ namespace VocaluxeLib.Menu.SongMenu
private readonly CText _Artist; private readonly CText _Artist;
private readonly CText _Title; private readonly CText _Title;
private readonly CText _SongLength; private readonly CText _SongLength;
private readonly CText _SongYear;
private float _SpaceW; private float _SpaceW;
private float _SpaceH; private float _SpaceH;
@@ -118,19 +119,21 @@ namespace VocaluxeLib.Menu.SongMenu
_Artist = new CText(_Theme.SongMenuList.TextArtist, _PartyModeID); _Artist = new CText(_Theme.SongMenuList.TextArtist, _PartyModeID);
_Title = new CText(_Theme.SongMenuList.TextTitle, _PartyModeID); _Title = new CText(_Theme.SongMenuList.TextTitle, _PartyModeID);
_SongLength = new CText(_Theme.SongMenuList.TextSongLength, _PartyModeID); _SongLength = new CText(_Theme.SongMenuList.TextSongLength, _PartyModeID);
_SongYear = new CText(_Theme.SongMenuList.TextSongYear, _PartyModeID);
_CoverBig = new CStatic(_Theme.SongMenuList.StaticCoverBig, _PartyModeID); _CoverBig = new CStatic(_Theme.SongMenuList.StaticCoverBig, _PartyModeID);
_TextBG = new CStatic(_Theme.SongMenuList.StaticTextBG, _PartyModeID); _TextBG = new CStatic(_Theme.SongMenuList.StaticTextBG, _PartyModeID);
_DuetIcon = new CStatic(_Theme.SongMenuList.StaticDuetIcon, _PartyModeID); _DuetIcon = new CStatic(_Theme.SongMenuList.StaticDuetIcon, _PartyModeID);
_VideoIcon = new CStatic(_Theme.SongMenuList.StaticVideoIcon, _PartyModeID); _VideoIcon = new CStatic(_Theme.SongMenuList.StaticVideoIcon, _PartyModeID);
_MedleyCalcIcon = new CStatic(_Theme.SongMenuList.StaticMedleyCalcIcon, _PartyModeID); _MedleyCalcIcon = new CStatic(_Theme.SongMenuList.StaticMedleyCalcIcon, _PartyModeID);
_MedleyTagIcon = new CStatic(_Theme.SongMenuList.StaticMedleyTagIcon, _PartyModeID); _MedleyTagIcon = new CStatic(_Theme.SongMenuList.StaticMedleyTagIcon, _PartyModeID);
_SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _DuetIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon}); _SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _SongYear, _DuetIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon});
} }
private void _ReadSubTheme() private void _ReadSubTheme()
{ {
_Theme.SongMenuList.TextArtist = (SThemeText)_Artist.GetTheme(); _Theme.SongMenuList.TextArtist = (SThemeText)_Artist.GetTheme();
_Theme.SongMenuList.TextSongLength = (SThemeText)_SongLength.GetTheme(); _Theme.SongMenuList.TextSongLength = (SThemeText)_SongLength.GetTheme();
_Theme.SongMenuList.TextSongYear = (SThemeText)_SongYear.GetTheme();
_Theme.SongMenuList.TextTitle = (SThemeText)_Title.GetTheme(); _Theme.SongMenuList.TextTitle = (SThemeText)_Title.GetTheme();
_Theme.SongMenuList.StaticCoverBig = (SThemeStatic)_CoverBig.GetTheme(); _Theme.SongMenuList.StaticCoverBig = (SThemeStatic)_CoverBig.GetTheme();
_Theme.SongMenuList.StaticDuetIcon = (SThemeStatic)_DuetIcon.GetTheme(); _Theme.SongMenuList.StaticDuetIcon = (SThemeStatic)_DuetIcon.GetTheme();
@@ -173,12 +176,12 @@ namespace VocaluxeLib.Menu.SongMenu
for (int i = 0; i < _ListLength; i++) for (int i = 0; i < _ListLength; i++)
{ {
//Create Cover //Create Cover
var rect = new SRectF(Rect.X + (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z); var rect = new SRectF(Rect.X, Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z);
var tile = new CStatic(_PartyModeID, _CoverBGTexture, _Color, rect); var tile = new CStatic(_PartyModeID, _CoverBGTexture, _Color, rect);
_Tiles.Add(tile); _Tiles.Add(tile);
//Create text //Create text
var textRect = new SRectF(MaxRect.X + 2 * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _ListTextWidth, _TileH, Rect.Z); var textRect = new SRectF(MaxRect.X + (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _ListTextWidth, _TileH, Rect.Z);
CText text = new CText(textRect.X, textRect.Y, textRect.Z, CText text = new CText(textRect.X, textRect.Y, textRect.Z,
textRect.H, textRect.W, EAlignment.Left, EStyle.Normal, textRect.H, textRect.W, EAlignment.Left, EStyle.Normal,
"Normal", _Artist.Color, ""); "Normal", _Artist.Color, "");
@@ -217,6 +220,7 @@ namespace VocaluxeLib.Menu.SongMenu
_Artist.Text = String.Empty; _Artist.Text = String.Empty;
_Title.Text = String.Empty; _Title.Text = String.Empty;
_SongLength.Text = String.Empty; _SongLength.Text = String.Empty;
_SongYear.Text = String.Empty;
_DuetIcon.Visible = false; _DuetIcon.Visible = false;
_VideoIcon.Visible = false; _VideoIcon.Visible = false;
_MedleyCalcIcon.Visible = false; _MedleyCalcIcon.Visible = false;
@@ -245,6 +249,7 @@ namespace VocaluxeLib.Menu.SongMenu
_CoverBig.Texture = song.CoverTextureBig; _CoverBig.Texture = song.CoverTextureBig;
_Artist.Text = song.Artist; _Artist.Text = song.Artist;
_Title.Text = song.Title; _Title.Text = song.Title;
_SongYear.Text = song.Year;
_DuetIcon.Visible = song.IsDuet; _DuetIcon.Visible = song.IsDuet;
_VideoIcon.Visible = song.VideoFileName != ""; _VideoIcon.Visible = song.VideoFileName != "";
_MedleyCalcIcon.Visible = song.Medley.Source == EDataSource.Calculated; _MedleyCalcIcon.Visible = song.Medley.Source == EDataSource.Calculated;
@@ -42,6 +42,7 @@ namespace VocaluxeLib.Menu.SongMenu
private CText _Artist; private CText _Artist;
private CText _Title; private CText _Title;
private CText _SongLength; private CText _SongLength;
private CText _SongYear;
private int _NumW; private int _NumW;
private int _NumH; private int _NumH;
@@ -113,13 +114,14 @@ namespace VocaluxeLib.Menu.SongMenu
_Artist = new CText(_Theme.SongMenuTileBoard.TextArtist, _PartyModeID); _Artist = new CText(_Theme.SongMenuTileBoard.TextArtist, _PartyModeID);
_Title = new CText(_Theme.SongMenuTileBoard.TextTitle, _PartyModeID); _Title = new CText(_Theme.SongMenuTileBoard.TextTitle, _PartyModeID);
_SongLength = new CText(_Theme.SongMenuTileBoard.TextSongLength, _PartyModeID); _SongLength = new CText(_Theme.SongMenuTileBoard.TextSongLength, _PartyModeID);
_SongYear = new CText(_Theme.SongMenuTileBoard.TextSongYear, _PartyModeID);
_CoverBig = new CStatic(_Theme.SongMenuTileBoard.StaticCoverBig, _PartyModeID); _CoverBig = new CStatic(_Theme.SongMenuTileBoard.StaticCoverBig, _PartyModeID);
_TextBG = new CStatic(_Theme.SongMenuTileBoard.StaticTextBG, _PartyModeID); _TextBG = new CStatic(_Theme.SongMenuTileBoard.StaticTextBG, _PartyModeID);
_DuetIcon = new CStatic(_Theme.SongMenuTileBoard.StaticDuetIcon, _PartyModeID); _DuetIcon = new CStatic(_Theme.SongMenuTileBoard.StaticDuetIcon, _PartyModeID);
_VideoIcon = new CStatic(_Theme.SongMenuTileBoard.StaticVideoIcon, _PartyModeID); _VideoIcon = new CStatic(_Theme.SongMenuTileBoard.StaticVideoIcon, _PartyModeID);
_MedleyCalcIcon = new CStatic(_Theme.SongMenuTileBoard.StaticMedleyCalcIcon, _PartyModeID); _MedleyCalcIcon = new CStatic(_Theme.SongMenuTileBoard.StaticMedleyCalcIcon, _PartyModeID);
_MedleyTagIcon = new CStatic(_Theme.SongMenuTileBoard.StaticMedleyTagIcon, _PartyModeID); _MedleyTagIcon = new CStatic(_Theme.SongMenuTileBoard.StaticMedleyTagIcon, _PartyModeID);
_SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _DuetIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon}); _SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _SongYear, _DuetIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon});
} }
private void _UpdateTileSelection() private void _UpdateTileSelection()
@@ -135,6 +137,7 @@ namespace VocaluxeLib.Menu.SongMenu
{ {
_Theme.SongMenuTileBoard.TextArtist = (SThemeText)_Artist.GetTheme(); _Theme.SongMenuTileBoard.TextArtist = (SThemeText)_Artist.GetTheme();
_Theme.SongMenuTileBoard.TextSongLength = (SThemeText)_SongLength.GetTheme(); _Theme.SongMenuTileBoard.TextSongLength = (SThemeText)_SongLength.GetTheme();
_Theme.SongMenuTileBoard.TextSongYear = (SThemeText)_SongYear.GetTheme();
_Theme.SongMenuTileBoard.TextTitle = (SThemeText)_Title.GetTheme(); _Theme.SongMenuTileBoard.TextTitle = (SThemeText)_Title.GetTheme();
_Theme.SongMenuTileBoard.StaticCoverBig = (SThemeStatic)_CoverBig.GetTheme(); _Theme.SongMenuTileBoard.StaticCoverBig = (SThemeStatic)_CoverBig.GetTheme();
_Theme.SongMenuTileBoard.StaticDuetIcon = (SThemeStatic)_DuetIcon.GetTheme(); _Theme.SongMenuTileBoard.StaticDuetIcon = (SThemeStatic)_DuetIcon.GetTheme();
@@ -208,6 +211,7 @@ namespace VocaluxeLib.Menu.SongMenu
_Artist.Text = String.Empty; _Artist.Text = String.Empty;
_Title.Text = String.Empty; _Title.Text = String.Empty;
_SongLength.Text = String.Empty; _SongLength.Text = String.Empty;
_SongYear.Text = String.Empty;
_DuetIcon.Visible = false; _DuetIcon.Visible = false;
_VideoIcon.Visible = false; _VideoIcon.Visible = false;
_MedleyCalcIcon.Visible = false; _MedleyCalcIcon.Visible = false;
@@ -236,6 +240,7 @@ namespace VocaluxeLib.Menu.SongMenu
_CoverBig.Texture = song.CoverTextureBig; _CoverBig.Texture = song.CoverTextureBig;
_Artist.Text = song.Artist; _Artist.Text = song.Artist;
_Title.Text = song.Title; _Title.Text = song.Title;
_SongYear.Text = song.Year;
_DuetIcon.Visible = song.IsDuet; _DuetIcon.Visible = song.IsDuet;
_VideoIcon.Visible = song.VideoFileName != ""; _VideoIcon.Visible = song.VideoFileName != "";
_MedleyCalcIcon.Visible = song.Medley.Source == EDataSource.Calculated; _MedleyCalcIcon.Visible = song.Medley.Source == EDataSource.Calculated;
+3 -1
View File
@@ -571,6 +571,8 @@ namespace VocaluxeLib.Songs
case ':': case ':':
case '*': case '*':
case 'F': case 'F':
case 'R': // Read R (RAP) and G (Golden RAP) notes as Freestyle notes currently. Final implementation needed!
case 'G': // Read R (RAP) and G (Golden RAP) notes as Freestyle notes currently. Final implementation needed!
string[] noteData = line.Split(splitChars, 4); string[] noteData = line.Split(splitChars, 4);
if (noteData.Length < 4) if (noteData.Length < 4)
{ {
@@ -618,7 +620,7 @@ namespace VocaluxeLib.Songs
if (tag.Equals('*')) if (tag.Equals('*'))
noteType = ENoteType.Golden; noteType = ENoteType.Golden;
else if (tag.Equals('F')) else if (tag.Equals('F') || tag.Equals('R') || tag.Equals('G')) // Read R (RAP) and G (Golden RAP) notes as Freestyle notes currently. Final implementation needed!
noteType = ENoteType.Freestyle; noteType = ENoteType.Freestyle;
else else
noteType = ENoteType.Normal; noteType = ENoteType.Normal;