Some improvements.
This commit is contained in:
1 parent
6dda1a38d0
commit
6c4fe011bf
6 files changed
+55
-66
No files matched your search
@@ -51,8 +51,13 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static bool VideoEnabled
|
||||
{
|
||||
get { return _SongPlayer.VideoEnabled; }
|
||||
set { _SongPlayer.VideoEnabled = value; }
|
||||
get { return _PlaysPreview ? _PreviewPlayer.VideoEnabled : _SongPlayer.VideoEnabled; }
|
||||
set {
|
||||
if(_PlaysPreview)
|
||||
_PreviewPlayer.VideoEnabled = value;
|
||||
else
|
||||
_SongPlayer.VideoEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool CanSing { get { return _BGMusicFiles.Contains(_CurrentPlaylistElement) ? false : _SongPlayer.CanSing; } }
|
||||
@@ -152,8 +157,8 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static void Close()
|
||||
{
|
||||
_SongPlayer.Close();
|
||||
_PreviewPlayer.Close();
|
||||
_SongPlayer.Stop();
|
||||
_PreviewPlayer.Stop();
|
||||
|
||||
_BGMusicFiles.Clear();
|
||||
_NotPlayedFiles.Clear();
|
||||
@@ -168,7 +173,7 @@ namespace Vocaluxe.Base
|
||||
return;
|
||||
|
||||
if (_PlaysPreview)
|
||||
_PreviewPlayer.TogglePause();
|
||||
_PreviewPlayer.Play();
|
||||
else
|
||||
if (_SongPlayer.SongLoaded)
|
||||
//Resume
|
||||
@@ -338,7 +343,7 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static void StopPreview()
|
||||
{
|
||||
_PreviewPlayer.Close();
|
||||
_PreviewPlayer.Stop();
|
||||
_PlaysPreview = false;
|
||||
}
|
||||
|
||||
@@ -350,7 +355,7 @@ namespace Vocaluxe.Base
|
||||
Debug.Assert(_CurrentPlaylistElement != null);
|
||||
|
||||
//If current song same as loaded restart only
|
||||
if (_CurrentPlaylistElement.SongID == _SongPlayer.SongID)
|
||||
if (_CurrentPlaylistElement.SongID == _SongPlayer.SongID && _SongPlayer.SongLoaded)
|
||||
_SongPlayer.Play();
|
||||
|
||||
//otherwhise load
|
||||
|
||||
@@ -168,6 +168,17 @@ namespace Vocaluxe.Screens
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnShow()
|
||||
{
|
||||
base.OnShow();
|
||||
_Buttons[_ButtonNext].Visible = !CBackgroundMusic.IsPlayingPreview;
|
||||
_Buttons[_ButtonPause].Visible = !CBackgroundMusic.IsPlayingPreview;
|
||||
_Buttons[_ButtonPlay].Visible = !CBackgroundMusic.IsPlayingPreview;
|
||||
_Buttons[_ButtonPrevious].Visible = !CBackgroundMusic.IsPlayingPreview;
|
||||
_Buttons[_ButtonRepeat].Visible = !CBackgroundMusic.IsPlayingPreview;
|
||||
_Buttons[_ButtonSing].Visible = !CBackgroundMusic.IsPlayingPreview;
|
||||
}
|
||||
|
||||
public override bool UpdateGame()
|
||||
{
|
||||
_Statics[_StaticCover].Visible = !_VideoPreviewInt || !CBackgroundMusic.SongHasVideo;
|
||||
|
||||
Reference in new issue
Block a user