Merge commit '6be397ac5b9b475b35c008e10a6464f7b33da752' into Better_note_timing
Conflicts: VocaluxeLib/Menu/SongMenu/CSong.cs VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs
This commit is contained in:
commit
24922e8c05
46 files changed
+889
-923
No files matched your search
@@ -303,7 +303,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
this.Folder = Path.GetDirectoryName(FilePath);
|
||||
|
||||
foreach (string folder in CBase.Base.Config.GetSongFolder())
|
||||
foreach (string folder in CBase.Config.GetSongFolder())
|
||||
{
|
||||
if (this.Folder.Contains(folder))
|
||||
{
|
||||
@@ -423,7 +423,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find audio file: " + Path.Combine(this.Folder, Value));
|
||||
CBase.Log.LogError("Can't find audio file: " + Path.Combine(this.Folder, Value));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -473,7 +473,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (File.Exists(Path.Combine(this.Folder, Value)))
|
||||
this.VideoFileName = Value;
|
||||
else
|
||||
CBase.Base.Log.LogError("Can't find video file: " + Path.Combine(this.Folder, Value));
|
||||
CBase.Log.LogError("Can't find video file: " + Path.Combine(this.Folder, Value));
|
||||
break;
|
||||
case "VIDEOGAP":
|
||||
CHelper.TryParse(Value, out this.VideoGap);
|
||||
@@ -519,31 +519,31 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (sr.EndOfStream)
|
||||
{
|
||||
//No other data then header
|
||||
CBase.Base.Log.LogError("Lyrics/Notes missing: " + FilePath);
|
||||
CBase.Log.LogError("Lyrics/Notes missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((HeaderFlags & EHeaderFlags.Title) == 0)
|
||||
{
|
||||
CBase.Base.Log.LogError("Title tag missing: " + FilePath);
|
||||
CBase.Log.LogError("Title tag missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((HeaderFlags & EHeaderFlags.Artist) == 0)
|
||||
{
|
||||
CBase.Base.Log.LogError("Artist tag missing: " + FilePath);
|
||||
CBase.Log.LogError("Artist tag missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((HeaderFlags & EHeaderFlags.MP3) == 0)
|
||||
{
|
||||
CBase.Base.Log.LogError("MP3 tag missing: " + FilePath);
|
||||
CBase.Log.LogError("MP3 tag missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((HeaderFlags & EHeaderFlags.BPM) == 0)
|
||||
{
|
||||
CBase.Base.Log.LogError("BPM tag missing: " + FilePath);
|
||||
CBase.Log.LogError("BPM tag missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -552,7 +552,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
if (this.Medley.StartBeat > this.Medley.EndBeat)
|
||||
{
|
||||
CBase.Base.Log.LogError("MedleyStartBeat is bigger than MedleyEndBeat in file: " + FilePath);
|
||||
CBase.Log.LogError("MedleyStartBeat is bigger than MedleyEndBeat in file: " + FilePath);
|
||||
HeaderFlags = HeaderFlags - EHeaderFlags.MedleyStartBeat - EHeaderFlags.MedleyEndBeat;
|
||||
}
|
||||
}
|
||||
@@ -562,7 +562,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
//PreviewStart is not set or <=0
|
||||
if ((HeaderFlags & EHeaderFlags.MedleyStartBeat) != 0)
|
||||
//fallback to MedleyStart
|
||||
this.PreviewStart = CBase.Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM);
|
||||
this.PreviewStart = CBase.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM);
|
||||
else
|
||||
//else set to 0, it will be set in FindRefrainStart
|
||||
this.PreviewStart = 0f;
|
||||
@@ -571,8 +571,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if ((HeaderFlags & EHeaderFlags.MedleyStartBeat) != 0 && (HeaderFlags & EHeaderFlags.MedleyEndBeat) != 0)
|
||||
{
|
||||
this.Medley.Source = EMedleySource.Tag;
|
||||
this.Medley.FadeInTime = CBase.Base.Settings.GetDefaultMedleyFadeInTime();
|
||||
this.Medley.FadeOutTime = CBase.Base.Settings.GetDefaultMedleyFadeOutTime();
|
||||
this.Medley.FadeInTime = CBase.Settings.GetDefaultMedleyFadeInTime();
|
||||
this.Medley.FadeOutTime = CBase.Settings.GetDefaultMedleyFadeOutTime();
|
||||
}
|
||||
#endregion check medley tags
|
||||
|
||||
@@ -580,7 +580,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error reading txt header in file \"" + FilePath + "\": " + e.Message);
|
||||
CBase.Log.LogError("Error reading txt header in file \"" + FilePath + "\": " + e.Message);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -612,7 +612,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (!File.Exists(FilePath))
|
||||
{
|
||||
CBase.Base.Log.LogError("Error loading song. The file does not exist: " + FilePath);
|
||||
CBase.Log.LogError("Error loading song. The file does not exist: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -654,7 +654,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (sr.EndOfStream)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". No lyrics/notes found: " + FilePath);
|
||||
CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". No lyrics/notes found: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -676,7 +676,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
Player = 2;
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Wrong or missing number after \"P\": " + FilePath);
|
||||
CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Wrong or missing number after \"P\": " + FilePath);
|
||||
return false;
|
||||
}
|
||||
sr.ReadLine();
|
||||
@@ -722,10 +722,9 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
case '-':
|
||||
if (isNewSentence)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Double sentence break: " + FilePath);
|
||||
CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Double sentence break: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
sr.Read();
|
||||
Param1 = CHelper.TryReadInt(sr);
|
||||
|
||||
@@ -751,7 +750,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
sr.ReadLine();
|
||||
break;
|
||||
default:
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Unexpected or missing character (" + TempC + "): " + FilePath);
|
||||
CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Unexpected or missing character (" + TempC + "): " + FilePath);
|
||||
return false;
|
||||
}
|
||||
int c = 0;
|
||||
@@ -770,7 +769,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". An unhandled exception occured (" + e.Message + "): " + FilePath);
|
||||
CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". An unhandled exception occured (" + e.Message + "): " + FilePath);
|
||||
return false;
|
||||
}
|
||||
FindRefrain();
|
||||
@@ -819,11 +818,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
return;
|
||||
if (this.CoverFileName != String.Empty)
|
||||
{
|
||||
if (!CBase.Base.DataBase.GetCover(Path.Combine(this.Folder, this.CoverFileName), ref _CoverTextureSmall, CBase.Base.Config.GetCoverSize()))
|
||||
_CoverTextureSmall = CBase.Base.Cover.GetNoCover();
|
||||
if (!CBase.DataBase.GetCover(Path.Combine(this.Folder, this.CoverFileName), ref _CoverTextureSmall, CBase.Config.GetCoverSize()))
|
||||
_CoverTextureSmall = CBase.Cover.GetNoCover();
|
||||
}
|
||||
else
|
||||
_CoverTextureSmall = CBase.Base.Cover.GetNoCover();
|
||||
_CoverTextureSmall = CBase.Cover.GetNoCover();
|
||||
|
||||
_CoverSmallLoaded = true;
|
||||
}
|
||||
@@ -864,12 +863,12 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (DuetPart1 == String.Empty)
|
||||
{
|
||||
DuetPart1 = "Part 1";
|
||||
CBase.Base.Log.LogError("Warning: Can't find #P1-tag for duets in \"" + this.Artist + " - " + this.Title + "\".");
|
||||
CBase.Log.LogError("Warning: Can't find #P1-tag for duets in \"" + this.Artist + " - " + this.Title + "\".");
|
||||
}
|
||||
if (DuetPart2 == String.Empty)
|
||||
{
|
||||
DuetPart2 = "Part 2";
|
||||
CBase.Base.Log.LogError("Warning: Can't find #P2-tag for duets in \"" + this.Artist + " - " + this.Title + "\".");
|
||||
CBase.Log.LogError("Warning: Can't find #P2-tag for duets in \"" + this.Artist + " - " + this.Title + "\".");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -960,7 +959,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
CLines lines = this.Notes.GetLines(0);
|
||||
|
||||
// set medley vars
|
||||
if (series.Count > 0 && series[longest].length > CBase.Base.Settings.GetMedleyMinSeriesLength())
|
||||
if (series.Count > 0 && series[longest].length > CBase.Settings.GetMedleyMinSeriesLength())
|
||||
{
|
||||
this.Medley.StartBeat = lines.Line[series[longest].start].FirstNoteBeat;
|
||||
this.Medley.EndBeat = lines.Line[series[longest].end].LastNoteBeat;
|
||||
@@ -968,16 +967,16 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
bool foundEnd = false;
|
||||
|
||||
// set end if duration > MedleyMinDuration
|
||||
if (CBase.Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM) + CBase.Base.Settings.GetMedleyMinDuration() >
|
||||
CBase.Base.Game.GetTimeFromBeats(this.Medley.EndBeat, this.BPM))
|
||||
if (CBase.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM) + CBase.Settings.GetMedleyMinDuration() >
|
||||
CBase.Game.GetTimeFromBeats(this.Medley.EndBeat, this.BPM))
|
||||
foundEnd = true;
|
||||
|
||||
if (!foundEnd)
|
||||
{
|
||||
for (int i = series[longest].start + 1; i < lines.LineCount - 1; i++)
|
||||
{
|
||||
if (CBase.Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM) + CBase.Base.Settings.GetMedleyMinDuration() >
|
||||
CBase.Base.Game.GetTimeFromBeats(lines.Line[i].LastNoteBeat, this.BPM))
|
||||
if (CBase.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM) + CBase.Settings.GetMedleyMinDuration() >
|
||||
CBase.Game.GetTimeFromBeats(lines.Line[i].LastNoteBeat, this.BPM))
|
||||
{
|
||||
foundEnd = true;
|
||||
this.Medley.EndBeat = lines.Line[i].LastNoteBeat;
|
||||
@@ -988,15 +987,15 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (foundEnd)
|
||||
{
|
||||
this.Medley.Source = EMedleySource.Calculated;
|
||||
this.Medley.FadeInTime = CBase.Base.Settings.GetDefaultMedleyFadeInTime();
|
||||
this.Medley.FadeOutTime = CBase.Base.Settings.GetDefaultMedleyFadeOutTime();
|
||||
this.Medley.FadeInTime = CBase.Settings.GetDefaultMedleyFadeInTime();
|
||||
this.Medley.FadeOutTime = CBase.Settings.GetDefaultMedleyFadeOutTime();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.PreviewStart == 0f)
|
||||
{
|
||||
if (this.Medley.Source == EMedleySource.Calculated)
|
||||
this.PreviewStart = CBase.Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM);
|
||||
this.PreviewStart = CBase.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
public void UpdateSongMenuType()
|
||||
{
|
||||
if (_Type != CBase.Base.Config.GetSongMenuType())
|
||||
if (_Type != CBase.Config.GetSongMenuType())
|
||||
CreateSongMenu();
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_SongMenu.OnHide();
|
||||
}
|
||||
|
||||
switch (CBase.Base.Config.GetSongMenuType())
|
||||
switch (CBase.Config.GetSongMenuType())
|
||||
{
|
||||
//case ESongMenu.TR_CONFIG_LIST:
|
||||
// _SongMenu = new CSongMenuList();
|
||||
@@ -225,7 +225,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
// break;
|
||||
}
|
||||
|
||||
_Type = CBase.Base.Config.GetSongMenuType();
|
||||
_Type = CBase.Config.GetSongMenuType();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -270,7 +270,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref _Color);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref _Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -441,17 +441,17 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (_streams.Count > 0 && _video != -1)
|
||||
{
|
||||
if (CBase.Base.Video.IsFinished(_video) || CBase.Base.Sound.IsFinished(_actsongstream))
|
||||
if (CBase.Video.IsFinished(_video) || CBase.Sound.IsFinished(_actsongstream))
|
||||
{
|
||||
CBase.Base.Video.Close(_video);
|
||||
CBase.Video.Close(_video);
|
||||
_video = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
float time = CBase.Base.Sound.GetPosition(_actsongstream);
|
||||
float time = CBase.Sound.GetPosition(_actsongstream);
|
||||
|
||||
float vtime = 0f;
|
||||
CBase.Base.Video.GetFrame(_video, ref _vidtex, time, ref vtime);
|
||||
CBase.Video.GetFrame(_video, ref _vidtex, time, ref vtime);
|
||||
if (_VideoFadeTimer.ElapsedMilliseconds <= 3000L)
|
||||
{
|
||||
_vidtex.color.A = (_VideoFadeTimer.ElapsedMilliseconds / 3000f);
|
||||
@@ -474,14 +474,14 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
foreach (int stream in _streams)
|
||||
{
|
||||
CBase.Base.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
CBase.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
}
|
||||
_streams.Clear();
|
||||
|
||||
CBase.Base.Video.Close(_video);
|
||||
CBase.Video.Close(_video);
|
||||
_video = -1;
|
||||
|
||||
CBase.Base.Drawing.RemoveTexture(ref _vidtex);
|
||||
CBase.Drawing.RemoveTexture(ref _vidtex);
|
||||
|
||||
_timer.Stop();
|
||||
_timer.Reset();
|
||||
@@ -507,7 +507,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (_video != -1)
|
||||
{
|
||||
CBase.Base.Drawing.DrawTexture(_vidtex, new SRectF(0, 0, 1280, 720, 0));
|
||||
CBase.Drawing.DrawTexture(_vidtex, new SRectF(0, 0, 1280, 720, 0));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -518,7 +518,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
foreach (int stream in _streams)
|
||||
{
|
||||
CBase.Base.Sound.SetStreamVolumeMax(stream, _MaxVolume);
|
||||
CBase.Sound.SetStreamVolumeMax(stream, _MaxVolume);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -579,7 +579,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
Init();
|
||||
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
_Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
_Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
@@ -593,11 +593,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (!_Initialized)
|
||||
return;
|
||||
|
||||
if (Category >= CBase.Base.Songs.GetNumCategories())
|
||||
if (Category >= CBase.Songs.GetNumCategories())
|
||||
return;
|
||||
|
||||
Reset();
|
||||
CBase.Base.Songs.SetCategory(Category);
|
||||
CBase.Songs.SetCategory(Category);
|
||||
}
|
||||
|
||||
protected virtual void ShowCategories()
|
||||
@@ -605,59 +605,59 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (!_Initialized)
|
||||
return;
|
||||
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() != -1)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() != -1)
|
||||
Reset();
|
||||
|
||||
Reset();
|
||||
CBase.Base.Songs.SetCategory(-1);
|
||||
CBase.Songs.SetCategory(-1);
|
||||
}
|
||||
|
||||
public void ApplyVolume()
|
||||
{
|
||||
CBase.Base.Sound.SetStreamVolume(_actsongstream, CBase.Base.Config.GetPreviewMusicVolume());
|
||||
CBase.Sound.SetStreamVolume(_actsongstream, CBase.Config.GetPreviewMusicVolume());
|
||||
}
|
||||
|
||||
protected void SelectSong(int nr)
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() >= 0 && (CBase.Base.Songs.GetNumVisibleSongs() > 0) && (nr >= 0) && ((_actsong != nr) || (_streams.Count == 0)))
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() >= 0 && (CBase.Songs.GetNumVisibleSongs() > 0) && (nr >= 0) && ((_actsong != nr) || (_streams.Count == 0)))
|
||||
{
|
||||
foreach (int stream in _streams)
|
||||
{
|
||||
CBase.Base.Sound.FadeAndStop(stream, 0f, 1f);
|
||||
CBase.Sound.FadeAndStop(stream, 0f, 1f);
|
||||
}
|
||||
_streams.Clear();
|
||||
|
||||
CBase.Base.Video.Close(_video);
|
||||
CBase.Video.Close(_video);
|
||||
_video = -1;
|
||||
|
||||
CBase.Base.Drawing.RemoveTexture(ref _vidtex);
|
||||
CBase.Drawing.RemoveTexture(ref _vidtex);
|
||||
|
||||
_actsong = nr;
|
||||
if (_actsong >= CBase.Base.Songs.GetNumVisibleSongs())
|
||||
if (_actsong >= CBase.Songs.GetNumVisibleSongs())
|
||||
_actsong = 0;
|
||||
|
||||
|
||||
int _stream = CBase.Base.Sound.Load(Path.Combine(CBase.Base.Songs.GetVisibleSong(_actsong).Folder, CBase.Base.Songs.GetVisibleSong(_actsong).MP3FileName), true);
|
||||
CBase.Base.Sound.SetStreamVolumeMax(_stream, _MaxVolume);
|
||||
CBase.Base.Sound.SetStreamVolume(_stream, 0f);
|
||||
int _stream = CBase.Sound.Load(Path.Combine(CBase.Songs.GetVisibleSong(_actsong).Folder, CBase.Songs.GetVisibleSong(_actsong).MP3FileName), true);
|
||||
CBase.Sound.SetStreamVolumeMax(_stream, _MaxVolume);
|
||||
CBase.Sound.SetStreamVolume(_stream, 0f);
|
||||
|
||||
float startposition = CBase.Base.Songs.GetVisibleSong(_actsong).PreviewStart;
|
||||
float startposition = CBase.Songs.GetVisibleSong(_actsong).PreviewStart;
|
||||
|
||||
if (startposition == 0f)
|
||||
startposition = CBase.Base.Sound.GetLength(_stream) / 4f;
|
||||
startposition = CBase.Sound.GetLength(_stream) / 4f;
|
||||
|
||||
CBase.Base.Sound.SetPosition(_stream, startposition);
|
||||
CBase.Base.Sound.Play(_stream);
|
||||
CBase.Base.Sound.Fade(_stream, 100f, 3f);
|
||||
CBase.Sound.SetPosition(_stream, startposition);
|
||||
CBase.Sound.Play(_stream);
|
||||
CBase.Sound.Fade(_stream, 100f, 3f);
|
||||
_streams.Add(_stream);
|
||||
_actsongstream = _stream;
|
||||
|
||||
if (CBase.Base.Songs.GetVisibleSong(_actsong).VideoFileName != String.Empty && CBase.Base.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Songs.GetVisibleSong(_actsong).VideoFileName != String.Empty && CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
_video = CBase.Base.Video.Load(Path.Combine(CBase.Base.Songs.GetVisibleSong(_actsong).Folder, CBase.Base.Songs.GetVisibleSong(_actsong).VideoFileName));
|
||||
_video = CBase.Video.Load(Path.Combine(CBase.Songs.GetVisibleSong(_actsong).Folder, CBase.Songs.GetVisibleSong(_actsong).VideoFileName));
|
||||
if (_video == -1)
|
||||
return;
|
||||
CBase.Base.Video.Skip(_video, startposition, CBase.Base.Songs.GetVisibleSong(_actsong).VideoGap);
|
||||
CBase.Video.Skip(_video, startposition, CBase.Songs.GetVisibleSong(_actsong).VideoGap);
|
||||
_VideoFadeTimer.Stop();
|
||||
_VideoFadeTimer.Reset();
|
||||
_VideoFadeTimer.Start();
|
||||
@@ -669,14 +669,14 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
foreach (int stream in _streams)
|
||||
{
|
||||
CBase.Base.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
CBase.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
}
|
||||
_streams.Clear();
|
||||
|
||||
CBase.Base.Video.Close(_video);
|
||||
CBase.Video.Close(_video);
|
||||
_video = -1;
|
||||
|
||||
CBase.Base.Drawing.RemoveTexture(ref _vidtex);
|
||||
CBase.Drawing.RemoveTexture(ref _vidtex);
|
||||
|
||||
_timer.Stop();
|
||||
_timer.Reset();
|
||||
|
||||
@@ -67,8 +67,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_TileW = (int)((_Theme.songMenuTileBoard.TileRect.W - _SpaceW * (_NumW - 1)) / _NumW);
|
||||
_TileH = (int)((_Theme.songMenuTileBoard.TileRect.H - _SpaceH * (_NumH - 1)) / _NumH);
|
||||
|
||||
_CoverTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
_CoverTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
|
||||
_Tiles = new List<CStatic>();
|
||||
for (int i = 0; i < _NumH; i++)
|
||||
@@ -82,7 +82,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
}
|
||||
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRect.Z);
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRect.Z);
|
||||
|
||||
_PreviewSelected = -1;
|
||||
_Offset = 0;
|
||||
@@ -116,7 +116,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
public override void OnShow()
|
||||
{
|
||||
if (CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && CBase.Base.Songs.GetNumCategories() > 0 && CBase.Base.Songs.GetCurrentCategoryIndex() == -1)
|
||||
if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && CBase.Songs.GetNumCategories() > 0 && CBase.Songs.GetCurrentCategoryIndex() == -1)
|
||||
{
|
||||
EnterCategory(0);
|
||||
}
|
||||
@@ -127,13 +127,13 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
//AfterCategoryChange();
|
||||
SetSelectedSong(_ActSong);
|
||||
AfterCategoryChange();
|
||||
CBase.Base.Songs.UpdateRandomSongList();
|
||||
CBase.Songs.UpdateRandomSongList();
|
||||
|
||||
int actcat = _PreviewSelected;
|
||||
if ((CBase.Base.Songs.GetNumCategories() > 0) && (actcat < 0))
|
||||
if ((CBase.Songs.GetNumCategories() > 0) && (actcat < 0))
|
||||
{
|
||||
_CoverBig.Texture = CBase.Base.Songs.GetCategory(0).CoverTextureBig;
|
||||
_Artist.Text = CBase.Base.Songs.GetCategory(0).Name;
|
||||
_CoverBig.Texture = CBase.Songs.GetCategory(0).CoverTextureBig;
|
||||
_Artist.Text = CBase.Songs.GetCategory(0).Name;
|
||||
_Title.Text = String.Empty;
|
||||
_SongLength.Text = String.Empty;
|
||||
_PreviewSelected = 0;
|
||||
@@ -144,7 +144,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_MedleyTagIcon.Visible = false;
|
||||
}
|
||||
|
||||
if (CBase.Base.Songs.GetNumVisibleSongs() == 0 && CBase.Base.Songs.GetSearchFilter() != String.Empty)
|
||||
if (CBase.Songs.GetNumVisibleSongs() == 0 && CBase.Songs.GetSearchFilter() != String.Empty)
|
||||
{
|
||||
_CoverBig.Texture = _CoverBigTexture;
|
||||
_Artist.Text = String.Empty;
|
||||
@@ -205,7 +205,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
switch (KeyEvent.Key)
|
||||
{
|
||||
case Keys.Enter:
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() < 0)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() < 0)
|
||||
{
|
||||
EnterCategory(_PreviewSelected);
|
||||
KeyEvent.Handled = true;
|
||||
@@ -218,71 +218,71 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
case Keys.Escape:
|
||||
case Keys.Back:
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() > -1 && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() > -1 && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
ShowCategories();
|
||||
KeyEvent.Handled = true;
|
||||
}
|
||||
//else if (CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF)
|
||||
//else if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF)
|
||||
//{
|
||||
// CGraphics.FadeTo(EScreens.ScreenMain);
|
||||
//}
|
||||
break;
|
||||
|
||||
case Keys.PageUp:
|
||||
if (CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
PrevCategory();
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.PageDown:
|
||||
if (CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
NextCategory();
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Left:
|
||||
if (_Locked > 0 && (!SongOptions.Selection.RandomOnly || SongOptions.Selection.CategoryChangeAllowed && CBase.Base.Songs.GetCurrentCategoryIndex() < 0))
|
||||
if (_Locked > 0 && (!SongOptions.Selection.RandomOnly || SongOptions.Selection.CategoryChangeAllowed && CBase.Songs.GetCurrentCategoryIndex() < 0))
|
||||
{
|
||||
_Locked--;
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && _Locked < CBase.Base.Songs.GetNumCategories() - _NumW ||
|
||||
CBase.Base.Songs.GetCurrentCategoryIndex() >= 0 && _Locked < CBase.Base.Songs.GetNumVisibleSongs() - _NumW)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() < 0 && _Locked < CBase.Songs.GetNumCategories() - _NumW ||
|
||||
CBase.Songs.GetCurrentCategoryIndex() >= 0 && _Locked < CBase.Songs.GetNumVisibleSongs() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Right:
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
if (_Locked < CBase.Base.Songs.GetNumCategories() - 1)
|
||||
if (_Locked < CBase.Songs.GetNumCategories() - 1)
|
||||
{
|
||||
_Locked++;
|
||||
if (_Locked < CBase.Base.Songs.GetNumCategories() - _NumW)
|
||||
if (_Locked < CBase.Songs.GetNumCategories() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() != -1 && _Locked < CBase.Base.Songs.GetNumVisibleSongs() - 1 && !SongOptions.Selection.RandomOnly)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() != -1 && _Locked < CBase.Songs.GetNumVisibleSongs() - 1 && !SongOptions.Selection.RandomOnly)
|
||||
{
|
||||
_Locked++;
|
||||
if (_Locked < CBase.Base.Songs.GetNumVisibleSongs() - _NumW)
|
||||
if (_Locked < CBase.Songs.GetNumVisibleSongs() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Up:
|
||||
if (KeyEvent.ModSHIFT && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (KeyEvent.ModSHIFT && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
PrevCategory();
|
||||
break;
|
||||
}
|
||||
|
||||
if (_Locked > _NumW - 1 && (!SongOptions.Selection.RandomOnly || SongOptions.Selection.CategoryChangeAllowed && CBase.Base.Songs.GetCurrentCategoryIndex() < 0))
|
||||
if (_Locked > _NumW - 1 && (!SongOptions.Selection.RandomOnly || SongOptions.Selection.CategoryChangeAllowed && CBase.Songs.GetCurrentCategoryIndex() < 0))
|
||||
{
|
||||
_Locked -= _NumW;
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
@@ -290,28 +290,28 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
break;
|
||||
|
||||
case Keys.Down:
|
||||
if (KeyEvent.ModSHIFT && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (KeyEvent.ModSHIFT && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
NextCategory();
|
||||
break;
|
||||
}
|
||||
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
if (_Locked < CBase.Base.Songs.GetNumCategories() - _NumW)
|
||||
if (_Locked < CBase.Songs.GetNumCategories() - _NumW)
|
||||
{
|
||||
_Locked += _NumW;
|
||||
if (_Locked < CBase.Base.Songs.GetNumCategories() - _NumW)
|
||||
if (_Locked < CBase.Songs.GetNumCategories() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_Locked < CBase.Base.Songs.GetNumVisibleSongs() - _NumW && !SongOptions.Selection.RandomOnly)
|
||||
if (_Locked < CBase.Songs.GetNumVisibleSongs() - _NumW && !SongOptions.Selection.RandomOnly)
|
||||
{
|
||||
_Locked += _NumW;
|
||||
if (_Locked < CBase.Base.Songs.GetNumVisibleSongs() - _NumW)
|
||||
if (_Locked < CBase.Songs.GetNumVisibleSongs() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
}
|
||||
@@ -341,13 +341,13 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
bool sel = false;
|
||||
int lastselection = _actualSelection;
|
||||
|
||||
if (!SongOptions.Selection.RandomOnly || CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (!SongOptions.Selection.RandomOnly || CBase.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
foreach (CStatic tile in _Tiles)
|
||||
{
|
||||
if ((tile.Texture.index != _CoverTexture.index) && CHelper.IsInBounds(tile.Rect, MouseEvent) && !sel)
|
||||
{
|
||||
if (MouseEvent.LB || CBase.Base.Songs.GetCurrentCategoryIndex() == -1)
|
||||
if (MouseEvent.LB || CBase.Songs.GetCurrentCategoryIndex() == -1)
|
||||
{
|
||||
if (_PreviewSelected == i + _Offset)
|
||||
_Locked = _PreviewSelected;
|
||||
@@ -372,29 +372,29 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
sel = true;
|
||||
|
||||
if (MouseEvent.Sender == ESender.WiiMote && _actualSelection != lastselection && _actualSelection != -1)
|
||||
CBase.Base.Input.SetRumble(0.050f);
|
||||
CBase.Input.SetRumble(0.050f);
|
||||
|
||||
if (!sel)
|
||||
_actualSelection = -1;
|
||||
|
||||
if ((MouseEvent.RB) && (CBase.Base.Songs.GetNumCategories() > 0) && CBase.Base.Songs.GetCurrentCategoryIndex() >= 0 && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if ((MouseEvent.RB) && (CBase.Songs.GetNumCategories() > 0) && CBase.Songs.GetCurrentCategoryIndex() >= 0 && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
ShowCategories();
|
||||
MouseEvent.Handled = true;
|
||||
return;
|
||||
}
|
||||
else if (MouseEvent.RB && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && !SongOptions.Selection.PartyMode)
|
||||
else if (MouseEvent.RB && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && !SongOptions.Selection.PartyMode)
|
||||
{
|
||||
CBase.Base.Graphics.FadeTo(EScreens.ScreenMain);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenMain);
|
||||
}
|
||||
else if (_PreviewSelected != -1 && MouseEvent.LB && CBase.Base.Songs.GetCurrentCategoryIndex() != -1 && !SongOptions.Selection.PartyMode)
|
||||
else if (_PreviewSelected != -1 && MouseEvent.LB && CBase.Songs.GetCurrentCategoryIndex() != -1 && !SongOptions.Selection.PartyMode)
|
||||
{
|
||||
if (CHelper.IsInBounds(_CoverBig.Rect, MouseEvent) || CHelper.IsInBounds(_TextBG.Rect, MouseEvent))
|
||||
{
|
||||
_Locked = _PreviewSelected;
|
||||
}
|
||||
}
|
||||
else if ((MouseEvent.LB) && (CBase.Base.Songs.GetCurrentCategoryIndex() == -1))
|
||||
else if ((MouseEvent.LB) && (CBase.Songs.GetCurrentCategoryIndex() == -1))
|
||||
{
|
||||
foreach (CStatic tile in _Tiles)
|
||||
{
|
||||
@@ -409,10 +409,10 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (MouseEvent.Wheel > 0)
|
||||
{
|
||||
if (CHelper.IsInBounds(_ScrollRect, MouseEvent) && (!SongOptions.Selection.RandomOnly || CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed))
|
||||
if (CHelper.IsInBounds(_ScrollRect, MouseEvent) && (!SongOptions.Selection.RandomOnly || CBase.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed))
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() >= 0 && CBase.Base.Songs.GetNumVisibleSongs() > _Offset + _NumW * MouseEvent.Wheel + _NumW * (_NumH - 1) ||
|
||||
CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && CBase.Base.Songs.GetNumCategories() > _Offset + _NumW * MouseEvent.Wheel + _NumW * (_NumH - 1))
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() >= 0 && CBase.Songs.GetNumVisibleSongs() > _Offset + _NumW * MouseEvent.Wheel + _NumW * (_NumH - 1) ||
|
||||
CBase.Songs.GetCurrentCategoryIndex() < 0 && CBase.Songs.GetNumCategories() > _Offset + _NumW * MouseEvent.Wheel + _NumW * (_NumH - 1))
|
||||
{
|
||||
_Offset += _NumW * MouseEvent.Wheel;
|
||||
UpdateList(_Offset);
|
||||
@@ -422,7 +422,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (MouseEvent.Wheel < 0)
|
||||
{
|
||||
if (CHelper.IsInBounds(_ScrollRect, MouseEvent) && (!SongOptions.Selection.RandomOnly || CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed))
|
||||
if (CHelper.IsInBounds(_ScrollRect, MouseEvent) && (!SongOptions.Selection.RandomOnly || CBase.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed))
|
||||
{
|
||||
_Offset += _NumW * MouseEvent.Wheel;
|
||||
if (_Offset < 0)
|
||||
@@ -449,12 +449,12 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
}
|
||||
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() >= 0)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() >= 0)
|
||||
{
|
||||
int actsong = _PreviewSelected;
|
||||
if ((CBase.Base.Songs.GetNumVisibleSongs() > actsong) && (actsong >= 0))
|
||||
if ((CBase.Songs.GetNumVisibleSongs() > actsong) && (actsong >= 0))
|
||||
{
|
||||
CSong song = CBase.Base.Songs.GetVisibleSong(actsong);
|
||||
CSong song = CBase.Songs.GetVisibleSong(actsong);
|
||||
|
||||
_CoverBig.Texture = song.CoverTextureBig;
|
||||
_Artist.Text = song.Artist;
|
||||
@@ -464,7 +464,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_MedleyCalcIcon.Visible = song.Medley.Source == EMedleySource.Calculated;
|
||||
_MedleyTagIcon.Visible = song.Medley.Source == EMedleySource.Tag;
|
||||
|
||||
float Time = CBase.Base.Sound.GetLength(_SongStream);
|
||||
float Time = CBase.Sound.GetLength(_SongStream);
|
||||
if (song.Finish != 0)
|
||||
Time = song.Finish;
|
||||
|
||||
@@ -477,16 +477,16 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
else
|
||||
{
|
||||
int actcat = _PreviewSelected;
|
||||
if ((CBase.Base.Songs.GetNumCategories() > actcat) && (actcat >= 0))
|
||||
if ((CBase.Songs.GetNumCategories() > actcat) && (actcat >= 0))
|
||||
{
|
||||
_CoverBig.Texture = CBase.Base.Songs.GetCategory(actcat).CoverTextureBig;
|
||||
_Artist.Text = CBase.Base.Songs.GetCategory(actcat).Name;
|
||||
_CoverBig.Texture = CBase.Songs.GetCategory(actcat).CoverTextureBig;
|
||||
_Artist.Text = CBase.Songs.GetCategory(actcat).Name;
|
||||
|
||||
int num = CBase.Base.Songs.NumSongsInCategory(actcat);
|
||||
int num = CBase.Songs.NumSongsInCategory(actcat);
|
||||
if (num != 1)
|
||||
_Title.Text = CBase.Base.Language.Translate("TR_SCREENSONG_NUMSONGS").Replace("%v", num.ToString());
|
||||
_Title.Text = CBase.Language.Translate("TR_SCREENSONG_NUMSONGS").Replace("%v", num.ToString());
|
||||
else
|
||||
_Title.Text = CBase.Base.Language.Translate("TR_SCREENSONG_NUMSONG").Replace("%v", num.ToString());
|
||||
_Title.Text = CBase.Language.Translate("TR_SCREENSONG_NUMSONG").Replace("%v", num.ToString());
|
||||
|
||||
_SongLength.Text = String.Empty;
|
||||
_DuetIcon.Visible = false;
|
||||
@@ -509,9 +509,9 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
RectangleF rect = new RectangleF(0f, 0f, _vidtex.width, _vidtex.height);
|
||||
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
|
||||
|
||||
CBase.Base.Drawing.DrawTexture(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
|
||||
CBase.Drawing.DrawTexture(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
|
||||
_vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), false);
|
||||
CBase.Base.Drawing.DrawTextureReflection(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
|
||||
CBase.Drawing.DrawTextureReflection(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
|
||||
_vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
|
||||
}
|
||||
|
||||
@@ -549,7 +549,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (VisibleSongNr < 0)
|
||||
return;
|
||||
|
||||
if (CBase.Base.Songs.GetNumVisibleSongs() > VisibleSongNr)
|
||||
if (CBase.Songs.GetNumVisibleSongs() > VisibleSongNr)
|
||||
{
|
||||
bool sel = false;
|
||||
foreach (CStatic tile in _Tiles)
|
||||
@@ -606,7 +606,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (CategoryNr < 0)
|
||||
return;
|
||||
|
||||
if (CBase.Base.Songs.GetNumCategories() > CategoryNr)
|
||||
if (CBase.Songs.GetNumCategories() > CategoryNr)
|
||||
{
|
||||
bool sel = false;
|
||||
foreach (CStatic tile in _Tiles)
|
||||
@@ -679,19 +679,19 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
private void NextCategory()
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() > -1)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() > -1)
|
||||
{
|
||||
CBase.Base.Songs.NextCategory();
|
||||
EnterCategory(CBase.Base.Songs.GetCurrentCategoryIndex());
|
||||
CBase.Songs.NextCategory();
|
||||
EnterCategory(CBase.Songs.GetCurrentCategoryIndex());
|
||||
}
|
||||
}
|
||||
|
||||
private void PrevCategory()
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() > -1)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() > -1)
|
||||
{
|
||||
CBase.Base.Songs.PrevCategory();
|
||||
EnterCategory(CBase.Base.Songs.GetCurrentCategoryIndex());
|
||||
CBase.Songs.PrevCategory();
|
||||
EnterCategory(CBase.Songs.GetCurrentCategoryIndex());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -708,26 +708,26 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (_actualSelection >= 0 && _actualSelection < _Tiles.Count)
|
||||
_Tiles[_actualSelection].Selected = true;
|
||||
|
||||
if ((_LastKnownNumSongs == CBase.Base.Songs.GetNumVisibleSongs()) && (_LastKnownCategory == CBase.Base.Songs.GetCurrentCategoryIndex()))
|
||||
if ((_LastKnownNumSongs == CBase.Songs.GetNumVisibleSongs()) && (_LastKnownCategory == CBase.Songs.GetCurrentCategoryIndex()))
|
||||
return;
|
||||
|
||||
_LastKnownCategory = CBase.Base.Songs.GetCurrentCategoryIndex();
|
||||
_LastKnownNumSongs = CBase.Base.Songs.GetNumVisibleSongs();
|
||||
_LastKnownCategory = CBase.Songs.GetCurrentCategoryIndex();
|
||||
_LastKnownNumSongs = CBase.Songs.GetNumVisibleSongs();
|
||||
UpdateList(0);
|
||||
CBase.Base.Songs.UpdateRandomSongList();
|
||||
CBase.Songs.UpdateRandomSongList();
|
||||
}
|
||||
|
||||
private void UpdateList(int offset)
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() > -1)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() > -1)
|
||||
{
|
||||
if (offset >= (CBase.Base.Songs.GetNumVisibleSongs() / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (CBase.Base.Songs.GetNumVisibleSongs() / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
if (offset >= (CBase.Songs.GetNumVisibleSongs() / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (CBase.Songs.GetNumVisibleSongs() / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (offset >= (CBase.Base.Songs.GetNumCategories() / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (CBase.Base.Songs.GetNumCategories() / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
if (offset >= (CBase.Songs.GetNumCategories() / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (CBase.Songs.GetNumCategories() / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
}
|
||||
|
||||
if (offset < 0)
|
||||
@@ -735,11 +735,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
for (int i = 0; i < _Tiles.Count; i++)
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() >= 0)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() >= 0)
|
||||
{
|
||||
if (CBase.Base.Songs.GetNumVisibleSongs() > i + offset)
|
||||
if (CBase.Songs.GetNumVisibleSongs() > i + offset)
|
||||
{
|
||||
_Tiles[i].Texture = CBase.Base.Songs.GetVisibleSong(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Texture = CBase.Songs.GetVisibleSong(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Color = new SColorF(1f, 1f, 1f, 1f);
|
||||
}
|
||||
else
|
||||
@@ -749,11 +749,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
}
|
||||
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() == -1)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() == -1)
|
||||
{
|
||||
if (CBase.Base.Songs.GetNumCategories() > i + offset)
|
||||
if (CBase.Songs.GetNumCategories() > i + offset)
|
||||
{
|
||||
_Tiles[i].Texture = CBase.Base.Songs.GetCategory(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Texture = CBase.Songs.GetCategory(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Color = new SColorF(1f, 1f, 1f, 1f);
|
||||
}
|
||||
else
|
||||
@@ -780,8 +780,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_TileW = (int)((_Theme.songMenuTileBoard.TileRectSmall.W - _SpaceW * (_NumW - 1)) / _NumW);
|
||||
_TileH = (int)((_Theme.songMenuTileBoard.TileRectSmall.H - _SpaceH * (_NumH - 1)) / _NumH);
|
||||
|
||||
_CoverTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
_CoverTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
|
||||
_Tiles = new List<CStatic>();
|
||||
for (int i = 0; i < _NumH; i++)
|
||||
@@ -796,7 +796,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
|
||||
_Rect = _Theme.songMenuTileBoard.TileRectSmall;
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRectSmall.Z);
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRectSmall.Z);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -806,8 +806,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_TileW = (int)((_Theme.songMenuTileBoard.TileRect.W - _SpaceW * (_NumW - 1)) / _NumW);
|
||||
_TileH = (int)((_Theme.songMenuTileBoard.TileRect.H - _SpaceH * (_NumH - 1)) / _NumH);
|
||||
|
||||
_CoverTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
_CoverTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
|
||||
_Tiles = new List<CStatic>();
|
||||
for (int i = 0; i < _NumH; i++)
|
||||
@@ -822,7 +822,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
|
||||
_Rect = _Theme.songMenuTileBoard.TileRect;
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRect.Z);
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRect.Z);
|
||||
}
|
||||
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
|
||||
Reference in new issue
Block a user