Merge branch 'develop' into ScalingFix
This commit is contained in:
18 files changed
+551
-120
No files matched your search
@@ -972,6 +972,11 @@ namespace VocaluxeLib.Menu
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool isPlaylistNameEditMode()
|
||||
{
|
||||
return _EditMode == EEditMode.PlaylistName;
|
||||
}
|
||||
|
||||
private void _PrepareList()
|
||||
{
|
||||
_PlaylistElements.Clear();
|
||||
@@ -1197,4 +1202,4 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
#endregion ThemeEdit
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
public SThemeText TextArtist;
|
||||
public SThemeText TextTitle;
|
||||
public SThemeText TextSongLength;
|
||||
public SThemeText TextSongYear;
|
||||
|
||||
public SThemeStatic StaticCoverBig;
|
||||
public SThemeStatic StaticTextBG;
|
||||
@@ -111,6 +112,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
public SThemeText TextArtist;
|
||||
public SThemeText TextTitle;
|
||||
public SThemeText TextSongLength;
|
||||
public SThemeText TextSongYear;
|
||||
|
||||
public SThemeStatic StaticCoverBig;
|
||||
public SThemeStatic StaticTextBG;
|
||||
@@ -220,7 +222,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();
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,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;
|
||||
@@ -118,19 +119,21 @@ 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);
|
||||
_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, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon});
|
||||
_SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _SongYear, _DuetIcon, _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();
|
||||
@@ -217,6 +220,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_Artist.Text = String.Empty;
|
||||
_Title.Text = String.Empty;
|
||||
_SongLength.Text = String.Empty;
|
||||
_SongYear.Text = String.Empty;
|
||||
_DuetIcon.Visible = false;
|
||||
_VideoIcon.Visible = false;
|
||||
_MedleyCalcIcon.Visible = false;
|
||||
@@ -245,6 +249,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;
|
||||
_VideoIcon.Visible = song.VideoFileName != "";
|
||||
_MedleyCalcIcon.Visible = song.Medley.Source == EDataSource.Calculated;
|
||||
@@ -344,19 +349,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:
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
private CText _Artist;
|
||||
private CText _Title;
|
||||
private CText _SongLength;
|
||||
private CText _SongYear;
|
||||
|
||||
private int _NumW;
|
||||
private int _NumH;
|
||||
@@ -113,13 +114,14 @@ 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);
|
||||
_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, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon});
|
||||
_SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _SongYear, _DuetIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon});
|
||||
}
|
||||
|
||||
private void _UpdateTileSelection()
|
||||
@@ -135,6 +137,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();
|
||||
@@ -208,6 +211,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_Artist.Text = String.Empty;
|
||||
_Title.Text = String.Empty;
|
||||
_SongLength.Text = String.Empty;
|
||||
_SongYear.Text = String.Empty;
|
||||
_DuetIcon.Visible = false;
|
||||
_VideoIcon.Visible = false;
|
||||
_MedleyCalcIcon.Visible = false;
|
||||
@@ -236,6 +240,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;
|
||||
_VideoIcon.Visible = song.VideoFileName != "";
|
||||
_MedleyCalcIcon.Visible = song.Medley.Source == EDataSource.Calculated;
|
||||
@@ -335,19 +340,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:
|
||||
|
||||
@@ -288,6 +288,17 @@ namespace VocaluxeLib.Songs
|
||||
return loader.ReadNotes();
|
||||
}
|
||||
|
||||
public bool ReloadSong(bool reloadNotes)
|
||||
{
|
||||
var loader = new CSongLoader(this);
|
||||
bool retValue = loader.ReadHeader();
|
||||
if (!retValue)
|
||||
return false;
|
||||
|
||||
retValue = loader.ReadNotes(reloadNotes);
|
||||
return retValue;
|
||||
}
|
||||
|
||||
public bool Save()
|
||||
{
|
||||
return Save(Path.Combine(Folder, FileName));
|
||||
|
||||
@@ -82,12 +82,16 @@ namespace VocaluxeLib.Songs
|
||||
_Song.Languages.Clear();
|
||||
_Song.Genres.Clear();
|
||||
_Song.UnknownTags.Clear();
|
||||
_Song.BackgroundFileNames.Clear();
|
||||
_Song._Comment = "";
|
||||
_Song.ManualEncoding = false;
|
||||
_Song.Medley.Source = EDataSource.None;
|
||||
_Song._CalculateMedley = true;
|
||||
_Song.Preview.Source = EDataSource.None;
|
||||
_Song.ShortEnd.Source = EDataSource.None;
|
||||
_Song.Start = 0;
|
||||
_Song.VideoGap = 0;
|
||||
_Song.Preview.StartTime = 0;
|
||||
|
||||
var headerFlags = new EHeaderFlags();
|
||||
StreamReader sr = null;
|
||||
@@ -761,4 +765,4 @@ namespace VocaluxeLib.Songs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user