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
+12
-5
No files matched your search
@@ -348,6 +348,7 @@ namespace Vocaluxe.PartyModes
|
|||||||
public override void OnClose()
|
public override void OnClose()
|
||||||
{
|
{
|
||||||
base.OnClose();
|
base.OnClose();
|
||||||
|
_Base.BackgroundMusic.SetStatus(false);
|
||||||
_Base.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
_Base.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -456,8 +457,9 @@ namespace Vocaluxe.PartyModes
|
|||||||
GameData.Songs.RemoveAt(0);
|
GameData.Songs.RemoveAt(0);
|
||||||
}
|
}
|
||||||
Menu.SongMenu.CSong Song = _Base.Songs.GetSongByID(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);
|
PreviewStream = _Base.Sound.Load(Song.GetMP3(), false);
|
||||||
_Base.Sound.SetPosition(PreviewStream, Song.PreviewStart);
|
_Base.Sound.SetPosition(PreviewStream, Song.PreviewStart);
|
||||||
_Base.Sound.SetStreamVolume(PreviewStream, 0f);
|
_Base.Sound.SetStreamVolume(PreviewStream, 0f);
|
||||||
@@ -491,8 +493,8 @@ namespace Vocaluxe.PartyModes
|
|||||||
{
|
{
|
||||||
int SongID = Fields[SelectedField].Content.SongID;
|
int SongID = Fields[SelectedField].Content.SongID;
|
||||||
Menu.SongMenu.CSong Song = _Base.Songs.GetSongByID(SongID);
|
Menu.SongMenu.CSong Song = _Base.Songs.GetSongByID(SongID);
|
||||||
if (_Base.BackgroundMusic.IsPlaying())
|
_Base.BackgroundMusic.SetStatus(true);
|
||||||
_Base.BackgroundMusic.Pause();
|
|
||||||
PreviewStream = _Base.Sound.Load(Song.GetMP3(), false);
|
PreviewStream = _Base.Sound.Load(Song.GetMP3(), false);
|
||||||
_Base.Sound.SetPosition(PreviewStream, Song.PreviewStart);
|
_Base.Sound.SetPosition(PreviewStream, Song.PreviewStart);
|
||||||
_Base.Sound.SetStreamVolume(PreviewStream, 0f);
|
_Base.Sound.SetStreamVolume(PreviewStream, 0f);
|
||||||
|
|||||||
@@ -502,7 +502,7 @@ namespace Vocaluxe.Base
|
|||||||
MouseEvent InputMouseEvent = new MouseEvent();
|
MouseEvent InputMouseEvent = new MouseEvent();
|
||||||
|
|
||||||
bool PopupPlayerControlAllowed = _CurrentScreen != EScreens.ScreenOptionsRecord && _CurrentScreen != EScreens.ScreenSing &&
|
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;
|
bool PopupVolumeControlAllowed = _CurrentScreen != EScreens.ScreenCredits && _CurrentScreen != EScreens.ScreenOptionsRecord;
|
||||||
|
|
||||||
|
|||||||
@@ -303,6 +303,10 @@ namespace Vocaluxe.Base
|
|||||||
return CBackgroundMusic.VideoEnabled;
|
return CBackgroundMusic.VideoEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetStatus(bool Disabled)
|
||||||
|
{
|
||||||
|
CBackgroundMusic.Disabled = Disabled;
|
||||||
|
}
|
||||||
|
|
||||||
public void Next()
|
public void Next()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ namespace Vocaluxe.Menu
|
|||||||
bool SongHasVideo();
|
bool SongHasVideo();
|
||||||
bool VideoEnabled();
|
bool VideoEnabled();
|
||||||
|
|
||||||
|
void SetStatus(bool Disabled);
|
||||||
void Next();
|
void Next();
|
||||||
void Previous();
|
void Previous();
|
||||||
void Pause();
|
void Pause();
|
||||||
|
|||||||
Reference in new issue
Block a user