Merge branch 'develop' into rap
This commit is contained in:
commit
612c18326d
46 files changed
+1632
-319
No files matched your search
@@ -64,6 +64,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
public SThemeText TextArtist;
|
||||
public SThemeText TextTitle;
|
||||
public SThemeText TextSongLength;
|
||||
public SThemeText TextSongYear;
|
||||
|
||||
public SThemeStatic StaticCoverBig;
|
||||
public SThemeStatic StaticTextBG;
|
||||
@@ -113,6 +114,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
public SThemeText TextArtist;
|
||||
public SThemeText TextTitle;
|
||||
public SThemeText TextSongLength;
|
||||
public SThemeText TextSongYear;
|
||||
|
||||
public SThemeStatic StaticCoverBig;
|
||||
public SThemeStatic StaticTextBG;
|
||||
@@ -223,7 +225,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
EScreen check = CBase.Graphics.GetNextScreenType();
|
||||
if (CBase.Graphics.GetNextScreenType() == EScreen.Sing)
|
||||
_ResetPreview(false);
|
||||
else if (CBase.Graphics.GetNextScreenType() != EScreen.Names || CBase.Config.GetBackgroundMusicStatus() == EBackgroundMusicOffOn.TR_CONFIG_OFF)
|
||||
else if ((CBase.Graphics.GetNextScreenType() != EScreen.Names && CBase.Graphics.GetNextScreenType() != EScreen.Highscore) || CBase.Config.GetBackgroundMusicStatus() == EBackgroundMusicOffOn.TR_CONFIG_OFF)
|
||||
_ResetPreview();
|
||||
}
|
||||
|
||||
@@ -291,7 +293,9 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
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() {}
|
||||
@@ -428,4 +432,4 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
}
|
||||
#endregion ThemeEdit
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
private readonly CText _Artist;
|
||||
private readonly CText _Title;
|
||||
private readonly CText _SongLength;
|
||||
private readonly CText _SongYear;
|
||||
|
||||
private float _SpaceW;
|
||||
private float _SpaceH;
|
||||
@@ -119,6 +120,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_Artist = new CText(_Theme.SongMenuList.TextArtist, _PartyModeID);
|
||||
_Title = new CText(_Theme.SongMenuList.TextTitle, _PartyModeID);
|
||||
_SongLength = new CText(_Theme.SongMenuList.TextSongLength, _PartyModeID);
|
||||
_SongYear = new CText(_Theme.SongMenuList.TextSongYear, _PartyModeID);
|
||||
_CoverBig = new CStatic(_Theme.SongMenuList.StaticCoverBig, _PartyModeID);
|
||||
_TextBG = new CStatic(_Theme.SongMenuList.StaticTextBG, _PartyModeID);
|
||||
_DuetIcon = new CStatic(_Theme.SongMenuList.StaticDuetIcon, _PartyModeID);
|
||||
@@ -126,13 +128,14 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_VideoIcon = new CStatic(_Theme.SongMenuList.StaticVideoIcon, _PartyModeID);
|
||||
_MedleyCalcIcon = new CStatic(_Theme.SongMenuList.StaticMedleyCalcIcon, _PartyModeID);
|
||||
_MedleyTagIcon = new CStatic(_Theme.SongMenuList.StaticMedleyTagIcon, _PartyModeID);
|
||||
_SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _DuetIcon, _RapIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon});
|
||||
_SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _SongYear, _DuetIcon, _RapIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon});
|
||||
}
|
||||
|
||||
private void _ReadSubTheme()
|
||||
{
|
||||
_Theme.SongMenuList.TextArtist = (SThemeText)_Artist.GetTheme();
|
||||
_Theme.SongMenuList.TextSongLength = (SThemeText)_SongLength.GetTheme();
|
||||
_Theme.SongMenuList.TextSongYear = (SThemeText)_SongYear.GetTheme();
|
||||
_Theme.SongMenuList.TextTitle = (SThemeText)_Title.GetTheme();
|
||||
_Theme.SongMenuList.StaticCoverBig = (SThemeStatic)_CoverBig.GetTheme();
|
||||
_Theme.SongMenuList.StaticDuetIcon = (SThemeStatic)_DuetIcon.GetTheme();
|
||||
@@ -176,12 +179,12 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
for (int i = 0; i < _ListLength; i++)
|
||||
{
|
||||
//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);
|
||||
_Tiles.Add(tile);
|
||||
|
||||
//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,
|
||||
textRect.H, textRect.W, EAlignment.Left, EStyle.Normal,
|
||||
"Normal", _Artist.Color, "");
|
||||
@@ -220,6 +223,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_Artist.Text = String.Empty;
|
||||
_Title.Text = String.Empty;
|
||||
_SongLength.Text = String.Empty;
|
||||
_SongYear.Text = String.Empty;
|
||||
_DuetIcon.Visible = false;
|
||||
_RapIcon.Visible = false;
|
||||
_VideoIcon.Visible = false;
|
||||
@@ -249,6 +253,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_CoverBig.Texture = song.CoverTextureBig;
|
||||
_Artist.Text = song.Artist;
|
||||
_Title.Text = song.Title;
|
||||
_SongYear.Text = song.Year;
|
||||
_DuetIcon.Visible = song.IsDuet;
|
||||
_RapIcon.Visible = song.IsRap;
|
||||
_VideoIcon.Visible = song.VideoFileName != "";
|
||||
@@ -349,19 +354,53 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
break;
|
||||
|
||||
case Keys.PageUp:
|
||||
if (catChangePossible)
|
||||
if (catChangePossible && CBase.Songs.IsInCategory() && (keyEvent.Mod == EModifier.Ctrl || keyEvent.Mod == EModifier.Alt))
|
||||
{
|
||||
_PrevCategory();
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
else if (moveAllowed)
|
||||
{
|
||||
if ((_SelectionNr - _ListLength) <= 0)
|
||||
_SelectionNr = 0;
|
||||
else
|
||||
_SelectionNr = _SelectionNr - _ListLength;
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.PageDown:
|
||||
if (catChangePossible)
|
||||
if (catChangePossible && CBase.Songs.IsInCategory() && (keyEvent.Mod == EModifier.Ctrl || keyEvent.Mod == EModifier.Alt))
|
||||
{
|
||||
_NextCategory();
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
else if (moveAllowed)
|
||||
{
|
||||
int maxCount_PageDown = (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && !CBase.Songs.IsInCategory() ? CBase.Songs.GetNumCategories() : CBase.Songs.GetNumSongsVisible());
|
||||
if ((_SelectionNr + _ListLength) >= maxCount_PageDown)
|
||||
_SelectionNr = maxCount_PageDown - 1;
|
||||
else
|
||||
_SelectionNr = _SelectionNr + _ListLength;
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Home:
|
||||
if (moveAllowed)
|
||||
{
|
||||
_SelectionNr = 0;
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.End:
|
||||
int maxCount_End = (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && !CBase.Songs.IsInCategory() ? CBase.Songs.GetNumCategories() : CBase.Songs.GetNumSongsVisible());
|
||||
if (moveAllowed)
|
||||
{
|
||||
_SelectionNr = maxCount_End - 1;
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Left:
|
||||
@@ -599,13 +638,28 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
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;
|
||||
|
||||
if (_SelectionNr < _Offset && _SelectionNr >= 0)
|
||||
offset = _SelectionNr;
|
||||
{
|
||||
if (_SelectionNr - halfListLength >= 0)
|
||||
offset = _SelectionNr - halfListLength;
|
||||
else
|
||||
offset = 0;
|
||||
}
|
||||
else if (_SelectionNr >= _Offset + _ListLength)
|
||||
offset = _SelectionNr - _ListLength + 1;
|
||||
{
|
||||
if (_SelectionNr + halfListLength > itemCount)
|
||||
offset = itemCount - _ListLength;
|
||||
else
|
||||
offset = _SelectionNr - halfListLength;
|
||||
}
|
||||
else
|
||||
offset = _Offset;
|
||||
|
||||
_UpdateList(offset, force);
|
||||
}
|
||||
|
||||
@@ -629,7 +683,11 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
CSong currentSong = CBase.Songs.GetVisibleSong(i + offset);
|
||||
_Tiles[i].Texture = currentSong.CoverTextureSmall;
|
||||
_Texts[i].Text = currentSong.Artist + " - " + currentSong.Title;
|
||||
|
||||
if (CBase.Config.GetSongSorting() == ESongSorting.TR_CONFIG_TITLE_LETTER)
|
||||
_Texts[i].Text = currentSong.Title + " - " + currentSong.Artist;
|
||||
else
|
||||
_Texts[i].Text = currentSong.Artist + " - " + currentSong.Title;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
private CText _Artist;
|
||||
private CText _Title;
|
||||
private CText _SongLength;
|
||||
private CText _SongYear;
|
||||
|
||||
private int _NumW;
|
||||
private int _NumH;
|
||||
@@ -114,6 +115,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_Artist = new CText(_Theme.SongMenuTileBoard.TextArtist, _PartyModeID);
|
||||
_Title = new CText(_Theme.SongMenuTileBoard.TextTitle, _PartyModeID);
|
||||
_SongLength = new CText(_Theme.SongMenuTileBoard.TextSongLength, _PartyModeID);
|
||||
_SongYear = new CText(_Theme.SongMenuTileBoard.TextSongYear, _PartyModeID);
|
||||
_CoverBig = new CStatic(_Theme.SongMenuTileBoard.StaticCoverBig, _PartyModeID);
|
||||
_TextBG = new CStatic(_Theme.SongMenuTileBoard.StaticTextBG, _PartyModeID);
|
||||
_DuetIcon = new CStatic(_Theme.SongMenuTileBoard.StaticDuetIcon, _PartyModeID);
|
||||
@@ -121,7 +123,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_VideoIcon = new CStatic(_Theme.SongMenuTileBoard.StaticVideoIcon, _PartyModeID);
|
||||
_MedleyCalcIcon = new CStatic(_Theme.SongMenuTileBoard.StaticMedleyCalcIcon, _PartyModeID);
|
||||
_MedleyTagIcon = new CStatic(_Theme.SongMenuTileBoard.StaticMedleyTagIcon, _PartyModeID);
|
||||
_SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _DuetIcon, _RapIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon});
|
||||
_SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _SongYear, _DuetIcon, _RapIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon});
|
||||
}
|
||||
|
||||
private void _UpdateTileSelection()
|
||||
@@ -137,6 +139,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
_Theme.SongMenuTileBoard.TextArtist = (SThemeText)_Artist.GetTheme();
|
||||
_Theme.SongMenuTileBoard.TextSongLength = (SThemeText)_SongLength.GetTheme();
|
||||
_Theme.SongMenuTileBoard.TextSongYear = (SThemeText)_SongYear.GetTheme();
|
||||
_Theme.SongMenuTileBoard.TextTitle = (SThemeText)_Title.GetTheme();
|
||||
_Theme.SongMenuTileBoard.StaticCoverBig = (SThemeStatic)_CoverBig.GetTheme();
|
||||
_Theme.SongMenuTileBoard.StaticDuetIcon = (SThemeStatic)_DuetIcon.GetTheme();
|
||||
@@ -211,6 +214,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_Artist.Text = String.Empty;
|
||||
_Title.Text = String.Empty;
|
||||
_SongLength.Text = String.Empty;
|
||||
_SongYear.Text = String.Empty;
|
||||
_DuetIcon.Visible = false;
|
||||
_RapIcon.Visible = false;
|
||||
_VideoIcon.Visible = false;
|
||||
@@ -240,6 +244,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_CoverBig.Texture = song.CoverTextureBig;
|
||||
_Artist.Text = song.Artist;
|
||||
_Title.Text = song.Title;
|
||||
_SongYear.Text = song.Year;
|
||||
_DuetIcon.Visible = song.IsDuet;
|
||||
_RapIcon.Visible = song.IsRap;
|
||||
_VideoIcon.Visible = song.VideoFileName != "";
|
||||
@@ -340,19 +345,55 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
break;
|
||||
|
||||
case Keys.PageUp:
|
||||
if (catChangePossible)
|
||||
if (catChangePossible && CBase.Songs.IsInCategory() && (keyEvent.Mod == EModifier.Ctrl || keyEvent.Mod == EModifier.Alt))
|
||||
{
|
||||
_PrevCategory();
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
else if (moveAllowed)
|
||||
{
|
||||
int numSongsPerPage = _NumH * _NumW;
|
||||
if ((_SelectionNr - numSongsPerPage) <= 0)
|
||||
_SelectionNr = 0;
|
||||
else
|
||||
_SelectionNr = _SelectionNr - numSongsPerPage;
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.PageDown:
|
||||
if (catChangePossible)
|
||||
if (catChangePossible && CBase.Songs.IsInCategory() && (keyEvent.Mod == EModifier.Ctrl || keyEvent.Mod == EModifier.Alt))
|
||||
{
|
||||
_NextCategory();
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
else if (moveAllowed)
|
||||
{
|
||||
int numSongsPerPage = _NumH * _NumW;
|
||||
int maxCount_PageDown = (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && !CBase.Songs.IsInCategory() ? CBase.Songs.GetNumCategories() : CBase.Songs.GetNumSongsVisible());
|
||||
if ((_SelectionNr + numSongsPerPage) >= maxCount_PageDown)
|
||||
_SelectionNr = maxCount_PageDown - 1;
|
||||
else
|
||||
_SelectionNr = _SelectionNr + numSongsPerPage;
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Home:
|
||||
if (moveAllowed)
|
||||
{
|
||||
_SelectionNr = 0;
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.End:
|
||||
int maxCount_End = (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && !CBase.Songs.IsInCategory() ? CBase.Songs.GetNumCategories() : CBase.Songs.GetNumSongsVisible());
|
||||
if (moveAllowed)
|
||||
{
|
||||
_SelectionNr = maxCount_End - 1;
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Left:
|
||||
|
||||
Reference in new issue
Block a user