added bg music control to base class. do not show popup player control if the bg music feature is disabled
This commit is contained in:
1 parent
17bb5bba51
commit
9a31f16358
4 files changed
+13
-6
No files matched your search
@@ -348,6 +348,7 @@ namespace Vocaluxe.PartyModes
|
||||
public override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
_Base.BackgroundMusic.SetStatus(false);
|
||||
_Base.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
}
|
||||
|
||||
@@ -456,8 +457,9 @@ namespace Vocaluxe.PartyModes
|
||||
GameData.Songs.RemoveAt(0);
|
||||
}
|
||||
Menu.SongMenu.CSong Song = _Base.Songs.GetSongByID(SongID);
|
||||
if(_Base.BackgroundMusic.IsPlaying())
|
||||
_Base.BackgroundMusic.Pause();
|
||||
|
||||
_Base.BackgroundMusic.SetStatus(true);
|
||||
|
||||
PreviewStream = _Base.Sound.Load(Song.GetMP3(), false);
|
||||
_Base.Sound.SetPosition(PreviewStream, Song.PreviewStart);
|
||||
_Base.Sound.SetStreamVolume(PreviewStream, 0f);
|
||||
@@ -491,8 +493,8 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
int SongID = Fields[SelectedField].Content.SongID;
|
||||
Menu.SongMenu.CSong Song = _Base.Songs.GetSongByID(SongID);
|
||||
if (_Base.BackgroundMusic.IsPlaying())
|
||||
_Base.BackgroundMusic.Pause();
|
||||
_Base.BackgroundMusic.SetStatus(true);
|
||||
|
||||
PreviewStream = _Base.Sound.Load(Song.GetMP3(), false);
|
||||
_Base.Sound.SetPosition(PreviewStream, Song.PreviewStart);
|
||||
_Base.Sound.SetStreamVolume(PreviewStream, 0f);
|
||||
|
||||
@@ -502,7 +502,7 @@ namespace Vocaluxe.Base
|
||||
MouseEvent InputMouseEvent = new MouseEvent();
|
||||
|
||||
bool PopupPlayerControlAllowed = _CurrentScreen != EScreens.ScreenOptionsRecord && _CurrentScreen != EScreens.ScreenSing &&
|
||||
_CurrentScreen != EScreens.ScreenSong && _CurrentScreen != EScreens.ScreenCredits;
|
||||
_CurrentScreen != EScreens.ScreenSong && _CurrentScreen != EScreens.ScreenCredits && !CBackgroundMusic.Disabled;
|
||||
|
||||
bool PopupVolumeControlAllowed = _CurrentScreen != EScreens.ScreenCredits && _CurrentScreen != EScreens.ScreenOptionsRecord;
|
||||
|
||||
|
||||
@@ -303,6 +303,10 @@ namespace Vocaluxe.Base
|
||||
return CBackgroundMusic.VideoEnabled;
|
||||
}
|
||||
|
||||
public void SetStatus(bool Disabled)
|
||||
{
|
||||
CBackgroundMusic.Disabled = Disabled;
|
||||
}
|
||||
|
||||
public void Next()
|
||||
{
|
||||
|
||||
@@ -133,7 +133,8 @@ namespace Vocaluxe.Menu
|
||||
bool IsPlaying();
|
||||
bool SongHasVideo();
|
||||
bool VideoEnabled();
|
||||
|
||||
|
||||
void SetStatus(bool Disabled);
|
||||
void Next();
|
||||
void Previous();
|
||||
void Pause();
|
||||
|
||||
Reference in new issue
Block a user